[richfaces-issues] [JBoss JIRA] Updated: (RF-6026) PickList doesn't accept comma in string value of SelectItem

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Wed Feb 4 10:10:44 EST 2009


     [ https://jira.jboss.org/jira/browse/RF-6026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-6026:
-------------------------------

    Fix Version/s: Future
         Assignee: Anton Belevich


> PickList doesn't accept comma in string value of SelectItem
> -----------------------------------------------------------
>
>                 Key: RF-6026
>                 URL: https://jira.jboss.org/jira/browse/RF-6026
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>         Environment: WebLogic 10, JSF 1.2, RichFaces 3.3.0, Hibernate JPA, Facelets 1.1.14
>            Reporter: Andrzej Haczewski
>            Assignee: Anton Belevich
>             Fix For: Future
>
>
> When you use a List<SelectItem> where SelectItems are created like this:
> new SelectItem("SOME STRING,CONTAINING COMMA", "A nice string to show in list")
> as a PickList <h:selectItems>, and use List<String> as PickList value, then PickList doesn't validate when you add that item to target list.
> The reason is that UISelectMany is trying to validate values "SOME STRINGS" and "CONTAINING COMMA" with available items.
> The exact point is the UISelectMany.matchValue() method, which returns false on validation of that PickList.
> Sample code:
> --- BackingBean.java
> class BackingBean {
> private List<SelectItem> picklistItems;
> private List<String> result;
> public BackingBean() {
> picklistItems = new ArrayList<SelectItem>();
> picklistItems.add(new SelectItem("SAMPLE,EXAMPLE", "Sample example"));
> }
> // then comes getters and setters for picklistItems and result
> }
> --- PickList.xhtml
> <rich:pickList value="#{backingBean.result}">
> <h:selectItems value="#{backingBean.picklistItems}">
> </rich:pickList>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list