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

[1260 byte] By [dipalikapadiaa] at [2007-10-3 1:31:37]
# 1
Try List instead of String[].
BalusCa at 2007-7-14 18:29:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...