I’ve read plenty on how I should do this, but I can’t seem to get it working. The left side populates fine. I’m just dealing with Strings. I’m using RichFaces 3.3.3 and JSF 1.2.
Thanks.
Here’s my bean for the right side:
public List<String> getTestRightSide(){
List<String> selectItems = new ArrayList<String>();
selectItems.add("OH");
return selectItems;
}
public void setTestRightSide(){
}
The left side is being populated by a list of SelectItems defined as follows and they display fine.
SelectItem item = new SelectItem(int, String, String);
Here’s my JSF:
<rich:pickList showButtonsLabel="false" value="#{selectBean.testRightSide}">
<f:selectItems value="#{selectBean.allGeographySelectItems}" />
</rich:pickList>
Nothing gets populated in the right. I can move things around fine.
A subquestion… the selectBean .testRightSide is where the items get sent to upon submission, right?
I found the answer. What I put in the right list must be a subset of what’s contained in the left list. My right list was not a subset of the left list. So I also added everything I was trying to put in the right list to left list and all is good.