[ 
https://issues.jboss.org/browse/RF-6026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646573#comment-12646573
 ] 

Damian Waradzyn commented on RF-6026:
-------------------------------------

Why not change the delimiter that splits values from simple coma to something 
little less commonly used, like '*[|_$$'? 

It is a dirty hack but in practice it would solve the problem. Redesigning to 
avoid the issue completely might be considered as future work, but simple fix 
should be done ASAP.
                
> PickList doesn't accept comma in string value of SelectItem
> -----------------------------------------------------------
>
>                 Key: RF-6026
>                 URL: https://issues.jboss.org/browse/RF-6026
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.3.0
>         Environment: WebLogic 10, JSF 1.2, RichFaces 3.3.0, Hibernate JPA, 
> Facelets 1.1.14
>            Reporter: Andrzej Haczewski
>             Fix For: 3.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, 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

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

Reply via email to