myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavan Shahi" <>
Subject Validation errors when using h:selectManyCheckbox
Date Mon, 24 Mar 2008 11:51:27 GMT
Hi All

Trying to get h:selectManyChekbox running sine 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

 My JSP code:
<h:selectManyCheckbox layout="pageDirection" value="#{
candidateViewEditBean.selectedSkillSets}" id="skillSet">
 <f:selectItems value="#{candidateViewEditBean.skillSetList}"/>
The backing bean has two ArrayLists:
 List<String> selectedSkillSets = new ArrayList<String>();
List<SelectItem> skillSetList = new ArrayList<SelectItem>();
///////////////// and in getSkillSetList() I am populating list in this way
SelectItem item1=new SelectItem("1","lab1");
SelectItem item2=new SelectItem("2","lab2");

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.

Pavan Shahi

View raw message