[richfaces-issues] [JBoss JIRA] (RF-11661) Cannot prefill the target list in rich:pickList
Brian Leathem (Commented) (JIRA)
jira-events at lists.jboss.org
Fri Nov 25 01:28:40 EST 2011
[ https://issues.jboss.org/browse/RF-11661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645538#comment-12645538 ]
Brian Leathem commented on RF-11661:
------------------------------------
In the provided test case, the selectableRoles and selectedRoles are defined as follows:
{code}
private List<RoleType> selectableRoles = Arrays.asList(RoleType.CUSTOMER, RoleType.DIRECTOR);
private List<RoleType> selectedRoles = Arrays.asList(RoleType.ADMIN);
{code}
This is _illegal_, as the selectedRole contains a value that is not in the selectableRoles. To get the test case to work, change the above to the following:
{code}
private List<RoleType> selectableRoles = Arrays.asList(RoleType.CUSTOMER, RoleType.DIRECTOR, RoleType.ADMIN);
private List<RoleType> selectedRoles = Arrays.asList(RoleType.ADMIN);
{code}
The source of items to select for the pickList must contain all allowable values. Your target list can then only contain allowable values.
> Cannot prefill the target list in rich:pickList
> -----------------------------------------------
>
> Key: RF-11661
> URL: https://issues.jboss.org/browse/RF-11661
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-selects
> Affects Versions: 4.1.0.Milestone3
> Reporter: Juergen Zimmermann
> Assignee: Brian Leathem
> Labels: testcase_provided
> Attachments: testcase-src.zip, testcase.war
>
>
> I'm populating the source list in the listener of the preRenderView event. However, if I try to also insert just one item in the target list, then it doesn't appear on the right hand side.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list