[ https://issues.apache.org/jira/browse/OFBIZ-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503202 ]
Scott Gray commented on OFBIZ-1075: ----------------------------------- Hi Jacopo I don't have time right now to look at the code, but I'm +1 for the feature in general. As a side note, I have always thought it would be good if the list and multi forms were able to display the titles to the left of the fields, sort of like a single form but in a list. It would make things much clearer in the more crowded forms. The image you attached is a perfect example for the fields: Thru Date, Price, and termUomId. > 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.