[
https://issues.apache.org/jira/browse/OFBIZ-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504474
]
David E. Jones commented on OFBIZ-1075:
---------------------------------------
I think this stuff looks great Jacopo.
I'm not sure if I like the use of the position attribute though, perhaps a new
one would be better for this?
I guess this is kind of like what I had in mind for position for list types of
forms, but not exactly. The general idea for it was that forms that are
primarily vertical with positions greater than one would push them into columns
corresponding to the position number. For more horizontal form entries (in
list, multi forms) it would push the items into lower rows.
For vertical (single) forms if there were fields with higher positions the
fields with position 1 followed by other fields with position 1 would just be
wider. For horizontal (list/multi) forms in this case the field would be taller
because it has no fields on the next row down.
It might be nice to implement that at some point (it would solve the problem of
the really wide list forms!), so we should probably use a different (new)
attribute for this feature, which is kind of more of a group header/footer. In
fact you could have an attribute that specifies where the field should go for
each record: header, body, or footer (default being body).
> 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, 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.