[jira] Created: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
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


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 | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)

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

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

    Attachment: productprice.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: productprice.jpg
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

    Attachment: productprice.patch

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

    Attachment: formlist-position.patch

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

I've forgot to mention that one of the enhancements introduced to the ModelForm class is that, in the context of list items, the fields of the previous row are passed in (in a map named "previousItem").
This is used in the <row-actions> tag of the example (product prices) to display the currency field only if it is different from the one of the previous record.



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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato edited comment on OFBIZ-1075 at 6/10/07 10:46 PM:
--------------------------------------------------------------------

I've forgotten to mention that one of the enhancements introduced to the ModelForm class is that, in the context of list items, the fields of the previous row are passed in (in a map named "previousItem").
This is used in the <row-actions> tag of the example (product prices) to display the currency field only if it is different from the one of the previous record.




 was:
I've forgot to mention that one of the enhancements introduced to the ModelForm class is that, in the context of list items, the fields of the previous row are passed in (in a map named "previousItem").
This is used in the <row-actions> tag of the example (product prices) to display the currency field only if it is different from the one of the previous record.



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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jonathon Wong commented on OFBIZ-1075:
--------------------------------------

Jacopo,

Are you saying that the column "currency type" is abstracted into the header rows "Euro" and "American Dollar"? And the rows are put under the correct section (under correct header row) of the list table according to their "currency type" (EUR/USD)? If so, looks good.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

Jonathon,

yes, you got it. Have a look at the simple change I did to the form definition (productprice.patch).


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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-1075:
----------------------------------------

I have no time to go in depth, but looking at comments and screencopy, I like it. I vote for !

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ 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 | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

    Attachment: list-with-positions.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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

    Attachment: position-list-example.diff

> 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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

David,

thanks for your review.
I think that what I have implemented is essentially what you are describing. In fact in my example I was not very clear and I have mixed up two concepts:
1) the implementation of positions to render the fields of one list item in more than one rows (where positions < 1 are before and >1 are after)
2) the usage of use-when to hide the fields belonging to certain positions to look like group headers

#2 is just a creative applications of positions.
#1 is probably what you are describing: see for example the diff file position-list-example.diff that if applied transforms the layout of the list from list-standard.jpg to list-with-positions.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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

David,

what do you think about my last comment? Does it address your concerns or am I missing your point of view?


> 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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

David E. Jones commented on OFBIZ-1075:
---------------------------------------

I just took a peek at your other images, especially the list-with-positions.jpg and it looks fine. So yeah, I think you're right that we are on the same page here.

This is fine as-is but one small enhancement to consider for the future is to change the header to support the 2nd, etc row labels below the first row ones.

To rephrase I think this can be committed as-is but that might be nice in the future.

> 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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

That's great... I will try to enhance the header following your suggestion: I agree that it would be nice.

Jacopo



> 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, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato reassigned OFBIZ-1075:
----------------------------------------

    Assignee: Jacopo Cappellato

> 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
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: formlist-position.patch, list-standard.jpg, list-with-positions.jpg, position-list-example.diff, 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1075) Implemented support for "position" attributes in fields of forms of type "list" and "multi".

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-1075:
------------------------------------------

David, all,

I've committed my work in rev. 550168.
The main differences from what I have described in this issue are:
1) at the end I've not changed the position attribute from positiveInteger to integer;
2) as a consequence I've suppressed (from my previous patch) the concept of the main (default) position (position="1"): positions are rendered as rows sorted by position (starting from 1);
3) the same happens for the header (I've implemented what David suggested)
4) I've added code, but for now it is commented out, to suppress an header for a field: the idea is that, if in a "field" element the title is explicitly set to "" (title="") then no cell will be created for the fields in the header; this is disabled for now because there are a lot of form definitions that are setting the title to "" in order to display an empty header: if we will move in this direction we will need to change them to title=" "; is this acceptable?

For more details see the commit log.



> 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
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: formlist-position.patch, list-standard.jpg, list-with-positions.jpg, position-list-example.diff, 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.

12