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


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

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to