[ 
https://issues.apache.org/jira/browse/OFBIZ-6414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gareth Carter updated OFBIZ-6414:
---------------------------------
    Attachment: ModelFormField.patch

Attached is a patch that fixes the issue with drop-down widget. The patch will 
encode all the values inside the collection and return's the string 
representation as [X, Y, Z]. 

Just to point out, the Collection interface does not state the toString() 
method should return the string representation as [X, Y, Z] but the 
AbstractCollection does. If, for whatever reason, a Collection was used that 
does not inherit AbstractCollection, the field will not be populated with any 
stored values. Luckily it seems ofbiz does not use this type of field and 
Jacques has pointed out to me variants of this type of UI that may well be used 
instead

> drop-down widget field with allow-multiple="true" does not display current 
> value
> --------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6414
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6414
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Trunk
>            Reporter: Gareth Carter
>            Priority: Minor
>         Attachments: ModelFormField.patch
>
>
> ModelFormField.getEntry returns the string representation of the value 
> corresponding to the field in either the context map or parameters map but 
> when the value is returned as a list [X, Y, Z], the opening and closing 
> brackets are encoded [X, Y, Z]
> This prevents the FormRenderer (atleast MacroFormRenderer) from detecting a 
> list object from the string and converting it back to a list
> eg - currentValueList = StringUtil.toList(currentValue);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to