prain
asked on
JSF : Error in h:selectBooleanCheckBox
OK here is the story...
I am trying to give the shortest of my code where I have trouble with.
I have a jsf page that contains the following snippet....
<c:forEach var="row" items="#{edPage.cRecords}" varStatus="nextRow">
<tr>
<td style="text-align: center;">
<h:selectBooleanCheckbox class="eCheckBox"
id="#{edPage.pageName.conc at(nextRow .index)}"
value="#{edPage.checkedLis t.get(next Row.index) }"
onclick="processServerSide (2);" > </h:selectBooleanCheckbox>
</td>
</tr>
</c:forEach>
The backer bean is working well. The problem is in the line
value="#{edPage.checkedLis t.get(next Row.index) }"
At the start this works great and I can see the checked/unchked boxes work great.
I also have several other buttons and tabs in my page. For example a "Previous" button. After the above page is
displayed, and then I click the "Previous" button or any other button or tab for that matter I get the folloing exception:
14:51:00,446 WARNING [javax.enterprise.resource .webcontai ner.jsf.li fecycle]
(http-localhost/127.0.0.1: 8080-4) For input string: "get":
java.lang.NumberFormatExce ption: For input string: "get"
at
java.lang.NumberFormatExce ption.forI nputString (NumberFor matExcepti on.java:65
) [rt.jar:1.7.0_55]
at java.lang.Integer.parseInt (Integer.j ava:492) [rt.jar:1.7.0_55]
at java.lang.Integer.parseInt (Integer.j ava:527) [rt.jar:1.7.0_55]
at javax.el.ListELResolver.to Integer(Li stELResolv er.java:40 7)
[jboss-el-api_2.2_spec-1.0 .2.Final-r edhat-1.ja r:1.0.2.Fi nal-redhat -1]
I do not understand what it is trying to tell me by :
java.lang.NumberFormatExce ption: For input string: "get"
Note : If I remove the line:
value="#{edPage.checkedLis t.get(next Row.index) }"
The error is not coming (but of course it will not be the functionality I want).
My backer bean has the following... (again very shortened for this questions purpose)
@ManagedBean( name="edPage")
@ViewScoped
public class EDPage {
private String pageName = "EPage";
private List<CrRecords> cRecords;
private List<Boolean> checkedList;
public void init() {
//cRecords are instantiated from Database
//checkedList is instantiated here and set to true or false based on cRecords
/** The above two lines work Great **/
}
..
..
//Getters and Setters
}
I am trying to give the shortest of my code where I have trouble with.
I have a jsf page that contains the following snippet....
<c:forEach var="row" items="#{edPage.cRecords}"
<tr>
<td style="text-align: center;">
<h:selectBooleanCheckbox class="eCheckBox"
id="#{edPage.pageName.conc
value="#{edPage.checkedLis
onclick="processServerSide
</td>
</tr>
</c:forEach>
The backer bean is working well. The problem is in the line
value="#{edPage.checkedLis
At the start this works great and I can see the checked/unchked boxes work great.
I also have several other buttons and tabs in my page. For example a "Previous" button. After the above page is
displayed, and then I click the "Previous" button or any other button or tab for that matter I get the folloing exception:
14:51:00,446 WARNING [javax.enterprise.resource
(http-localhost/127.0.0.1:
java.lang.NumberFormatExce
at
java.lang.NumberFormatExce
) [rt.jar:1.7.0_55]
at java.lang.Integer.parseInt
at java.lang.Integer.parseInt
at javax.el.ListELResolver.to
[jboss-el-api_2.2_spec-1.0
I do not understand what it is trying to tell me by :
java.lang.NumberFormatExce
Note : If I remove the line:
value="#{edPage.checkedLis
The error is not coming (but of course it will not be the functionality I want).
My backer bean has the following... (again very shortened for this questions purpose)
@ManagedBean( name="edPage")
@ViewScoped
public class EDPage {
private String pageName = "EPage";
private List<CrRecords> cRecords;
private List<Boolean> checkedList;
public void init() {
//cRecords are instantiated from Database
//checkedList is instantiated here and set to true or false based on cRecords
/** The above two lines work Great **/
}
..
..
//Getters and Setters
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.