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

Jacopo Cappellato updated OFBIZ-1075:
-------------------------------------

    Attachment: list-standard.jpg

> Implemented support for "position" attributes in fields of forms of type 
> "list" and "multi".
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1075
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1075
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>         Attachments: formlist-position.patch, list-standard.jpg, 
> productprice.jpg, productprice.patch
>
>
> With the attached patch (formlist-position.patch) I've implemented support 
> for "position" attributes in fields of forms of type "list" and "multi".
> The main concept is that, if in a form widget definition of type 
> "list"/"multi", the fields have different positions then they are rendered 
> into separate rows.
> The main (default) position is 1, and the column (titles) are only the ones 
> for the fields in this group.
> The fields in positions < 1 are rendered in rows before the main one; the 
> fields in positions > 1 are rendered after.
> As a proof of concept (so that you can understand how the positions can be 
> used in lists), I've applied it to the currency field in the "product price 
> list" form (see the patch productprice.patch and the image productprice.jpg)
> To all the reviewers:
> I'd like to get your comments and reviews most of all to the two main changes 
> introduced by this patch:
> 1) in widget-form.xsd: the type of the element "position" has been changed 
> from "xs:positiveInteger" to "xs:integer"
> 2) in the interface "FormStringRenderer": the method 
> "renderFormatItemRowCellOpen" has now a new parameter (int positionSpan)
> All the other changes (most of all to the ModelForm class) are just:
> 1) refactoring of existing methods; I have separated into different methods 
> the field processing logic (eval on use-when etc) from the rendering 
> (buffer.append etc..); to make the code cleaner, more flexible and easier to 
> read
> 2) bug fixes (I can provide more details here, if you want)
> 3) added comments
> What do you think?
> I'm testing everything right now and I'd like to commit this stuff very soon.

-- 
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