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

Jacques Le Roux updated OFBIZ-1130:
-----------------------------------

    Summary:  Forms widget : <check ...> support incomplete  (was:  Froms 
<check ...> support incomplete)

>  Forms widget : <check ...> support incomplete
> ----------------------------------------------
>
>                 Key: OFBIZ-1130
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1130
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Wickersheimer Jeremy
>            Assignee: Jacques Le Roux
>         Attachments: findServices.patch, htmlFormRenderer.patch
>
>
> The check boxes used in forms are not properly supported by the framework. I 
> found out some issues at least with:
> - the performFind defined FindServices.java
> - the renderCheckField() method in HtmlFormRenderer.java
> For example if in a Form of type single i want to use checkboxes to define a 
> filter on a finder Form:
> <check>
>     <entity-options description="${description}" entity-name="StatusItem" 
> key-field-name="statusId">
>         <entity-constraint name="statusTypeId" value="ORDER_STATUS"/>
>         <entity-order-by field-name="description"/>
>     </entity-options>
> </check>
> Then in the list i use performFind :
> <service service-name="performFind" result-map-name="result" 
> result-map-list-name="listIt">
>     <field-map field-name="inputFields" env-name="requestParameters"/>
>     <field-map field-name="entityName" env-name="entityName"/>
> </service>
> There will be an Exception thrown by the createCondition() method in 
> FindServices.java because it expects only ONE value to be given for one 
> field. But using checkboxes (the same problem would occur with a list i 
> think) multiple values could be passed.
> The problems is that in this method there is the assumption that the value is 
> a String (unique value selected) whereas it could be a List (multiple value 
> selected).
> The second issue is in the HtmlFormRenderer, the same assumption is made in 
> the renderCheckField() method to determine whether the checkbox should 
> rendered selected. Here no exception is thrown because the value is a String 
> in all case: either the String representation of the value or the String 
> representation of the List of values ( [val1, val2, ...] )
> I have patches for those two issues.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to