[jira] Created: (OFBIZ-542) Unnecessary extra cells on list based tables

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

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

Nicolas Malin (Jira)

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

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

Jacques: if you don't mind, please let me review and apply this patch once Valentina resubmits it.

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

OK David,

Anyway I was only willing  to test this patch not to apply it.

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

Jacques: yeah, no problem, it would be great if you could look at it too!

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

Valentina Sirkova commented on OFBIZ-542:
-----------------------------------------

Hi,
Ok, I am re-submiting the patch in a minute. This time i will call it ModelForm3.patch to be clear it is the latest one.Please refer to ModelForm3.patch.
Thanks: Valentina

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

Valentina Sirkova updated OFBIZ-542:
------------------------------------

    Attachment: ModelForm3.patch

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

Valantina,

Thanks to care about numbers. I was just thinking to add a recommendation for contributors on OFBiz doc site (Confuence). I think it's even better to always keep the same name (Jira takes care of that). So the commitier will have to check the date. Actually not even as Jira is graying old files.

What do you think folks ?

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm2.patch, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

Jacques Le Roux updated OFBIZ-542:
----------------------------------

    Attachment:     (was: ModelForm2.patch)

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

For me it's ok now. I vote for this patch.

Thanks Valentina

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

Scott Gray commented on OFBIZ-542:
----------------------------------

Hi Jacques
I noticed if you keep the name of the attachment the same, then the older ones are grayed out which makes the newest patch obvious.

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

Scott,

Yes that's exactly what I said above ;o). I guess we should define a policy to post in Contributor for that. With perhaps a convention for naming files, at least extension : patch !

We may post a comment on http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices

WDYT ?

Thanks

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-542) Unnecessary extra cells on list based tables

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

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

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

I posted a comment in http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices 

> Unnecessary  extra cells on list based tables
> ---------------------------------------------
>
>                 Key: OFBIZ-542
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-542
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Valentina Sirkova
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: AScreenCopy.PNG, ModelForm3.patch
>
>
> Hey guys!
>  I noticed tables that are list - based, have one extra header cell and one extra row cell. The header cell is generated by the methods renderFormatHeaderRowFormCellOpen and renderFormatHeaderRowFormCellClose (HtmlFormRenderer.java). The row cell is generated by the methods renderFormatItemRowFormCellOpen and renderFormatItemRowFormCellClose (HtmlFormRenderer.java). These two cells appear no matter if they should or should not. I browsed through the java implementation of the list form and reached the following conclusion:
> For the extra header cell:
> The method renderFormatHeaderRowFormCellOpen for example, is called in renderHeaderRow(ModelForm.java). As far as I got, there are 3 loops that are responsible for the cells generation.
> The first one visualizes the display,display_entity and hyperlink fields.
> The second one viusalizes the other fields and if there are some they are put in that extra cell.
> But if for example the list has only display,display_entity and hyperlink fields then after the second loop the extra cell is generated though it is not necessary.
> My solution to that problem is to add one boolean variable which is set to true if after the first loop the end of the list is reached. This flags the situation when all of the fields are of type display, display_entity or hyperlink.
>  
> For the extra row cell the situation and solution is the same.
> My patch fixes that problem.
> Thanks: Valentina

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
12