JSF : Error in h:selectBooleanCheckBox

Posted on 2014-07-16
Last Modified: 2014-07-22
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">
    <td style="text-align: center;">

          <h:selectBooleanCheckbox  class="eCheckBox"
                         onclick="processServerSide(2);" > </h:selectBooleanCheckbox>

The backer bean is working well. The problem is in the line


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.webcontainer.jsf.lifecycle]
(http-localhost/ For input string: "get":
java.lang.NumberFormatException: For input string: "get"
) [rt.jar:1.7.0_55]
      at java.lang.Integer.parseInt( [rt.jar:1.7.0_55]
      at java.lang.Integer.parseInt( [rt.jar:1.7.0_55]
      at javax.el.ListELResolver.toInteger(

I do not understand what it is trying to tell me by :
java.lang.NumberFormatException: For input string: "get"

Note : If I remove the line:


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")
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
Question by:prain
    1 Comment
    LVL 35

    Accepted Solution

    The error means that this line

    > edPage.checkedList.get(nextRow.index)

    returns the value "get" at some point. So the problem is that you insert wrong data in the list.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    #Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
    When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
    The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now