problems with selectManyListBox
Hello,
I am having a problem with the selectManyListBox. Here is the code:
<h:selectManyListbox styleClass="selectManyListbox" id="resourceList" value="# {pc_SecurityManagementWizard2a.selectedResources}">
<f:selectItems value="#{pc_SecurityManagementWizard2a.resourceListValue}" />
</h:selectManyListbox>
In the backing bean, selectedResources is a string array (String [ ] selectedResources), and resourceListValue is a list (List resourceListValue). Here are the get/set methods for selectedResources:
public String[] getSelectedResources() {
return selectedResources;
}
public void setSelectedResources(String[] selectedResources) {
System.out.println("trying to set");
this.selectedResources = selectedResources;
}
When i submit from the jsp, i get the error: Validation Error: Value is not valid. I'm not sure if it is because i am binding the value of the selectManyListBox to String[ ], and all the items in the listbox are populated from a List.....and if this is the case how do i fix it?
I tried making all the items in the listbox strings, and it still didn't work.
Any help would be greatly appreciated.
Thanks
Dipali

