I am using a Richfaces' picklist and I want to populate the right-side panel with a list of SelectItems from my backing bean.
Populating the left-side is not a problem from the backing bean, however, the right hand side is problematic.
This is what I currently have
<h:outputText value="Roles" />
<rich:pickList showButtonsLabel="false">
<f:selectItems value="#{Bean.allRoles}" />
</rich:pickList>
EDIT:
So I have roles 'a', 'b', 'c', and 'd'.
The user has roles 'a' and 'd', so 'a' and 'd' should be on the right-side panel and 'b' and 'c' should be on the left-side panel.
EDIT:
Further explanation.
I have three lists for the user.
- All posible roles (a thru d)
- All roles the user is part of (a and d)
- All roles the user is NOT part of (b and c)
All lists have the data type ArrayList<SelectItem>
.
I need the capability to move individual roles between list number 1 and list number 2 and then save the new set of roles. I thought the picklist would be the best richfaces object for the job.