File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Validation errors when using h:selectManyCheckbox Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Validation errors when using h:selectManyCheckbox" Watch "Validation errors when using h:selectManyCheckbox" New topic
Author

Validation errors when using h:selectManyCheckbox

Pavan Shahi
Ranch Hand

Joined: May 01, 2006
Posts: 39
Trying to get h:selectManyCheckbox running since about 1 days, but I
always get a validation error when I select one of the checkboxes
Validation error : Value is not a valid option
Using in the JSP:
<h:selectManyCheckbox layout="pageDirection" value="#{candidateViewEditBean.selectedSkillSets}" id="skillSet">
<f:selectItems value="#{candidateViewEditBean.skillSetList}"/>
</h:selectManyCheckbox>
The backing bean has two ArrayLists:
List<String> selectedSkillSets = new ArrayList<String>();
and
List<SelectItem> skillSetList = new ArrayList<SelectItem>();

As I know browser always submit value is string format and my selected List is also of string hence it should not create validation error.

When I am doing hit and trail to fixed this problem I found that if I put backing bean in session scope then it work fine. But I cant put bean in session scope due to some other issues.

Please help me !
Your suggestion will be highly appreciated.

Thanks Pavan Kumar


SCJP 1.4 (93%)<br />SCBCD 5 (96%)
Pavan Shahi
Ranch Hand

Joined: May 01, 2006
Posts: 39
:shocked: :shocked:
No one !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation errors when using h:selectManyCheckbox
 
Similar Threads
Bean Value is always Null
selectManyCheckbox
Help - question on selectOneListbox and page reloads
How to prepopulate combo boxes on page startup
can't get values from h:selectManyCheckbox