Unnecessary extra cells on list based tables
--------------------------------------------- Key: OFBIZ-542 URL: http://issues.apache.org/jira/browse/OFBIZ-542 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: framework Reporter: Valentina Sirkova 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
Valentina Sirkova updated OFBIZ-542: ------------------------------------ Attachment: ModelForm.patch > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Attachments: ModelForm.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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=comments#action_12457794 ]
Jacopo Cappellato commented on OFBIZ-542: ----------------------------------------- Hi Valentina, first of all, thanks for the patch. Second: I had not time to really review it, sorry, but I'm sure that others will do it soon. This comment is just for pointing out some minor formatting and coding conventions issues I've noticed in your patch: 1) always put a blank space between a variable and an operator listEnd=true; // bad listEnd = true; // good 2) whenever possible, simplify boolean comparisons: if (listEnd==false) { // bad if (!listEnd) { // good You'll find more information about this stuff here: http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices Thanks Jacopo > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Attachments: ModelForm.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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
Valentina Sirkova updated OFBIZ-542: ------------------------------------ Attachment: ModelForm2.patch > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Attachments: ModelForm.patch, 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=comments#action_12458123 ]
Valentina Sirkova commented on OFBIZ-542: ----------------------------------------- Thanks Jacopo, I made the corrections. Please ignore ModelForm.patch(it is not a good one) and refer to ModelForm2.patch instead, it is the better one:) > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Attachments: ModelForm.patch, 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
Jacques Le Roux updated OFBIZ-542: ---------------------------------- Attachment: (was: ModelForm.patch) > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
Jacques Le Roux reassigned OFBIZ-542: ------------------------------------- Assignee: Jacques Le Roux > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: Jacques Le Roux > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
Jacques Le Roux closed OFBIZ-542. --------------------------------- Fix Version/s: SVN trunk Resolution: Fixed Valentina, Your patch is in OFBiz rev. 486834 Just something strange : in your patch the 1st 3 lines are Index: framework/widget/src/org/ofbiz/widget/form/ModelForm.java =================================================================== --- /framework/widget/src/org/ofbiz/widget/form/ModelForm.java (revision 486643) +++ /framework/widget/src/org/ofbiz/widget/form/ModelForm.java (working copy) I don't know exactly how you did that but the 1st / in 2d and 3d lines was annoying. Thanks for your work ! > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: Jacques Le Roux > Fix For: SVN trunk > > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=comments#action_12458929 ]
Si Chen commented on OFBIZ-542: ------------------------------- I had to revert this patch because it was causing a bug on forms like this: <form name="ListContactListParties" type="multi" separate-columns="false" use-row-submit="true" title="Contact List Parties" default-title-style="tableheadtext" target="${listContactListPartiesTarget}?contactListId=${parameters.contactListId}" default-widget-style="tabletext" default-tooltip-style="tabletext" default-table-style="crmsfaListTable" header-row-style="crmsfaListTableHeader" even-row-style="rowWhite" odd-row-style="rowLightGray" paginate-target="${listSortTarget}" paginate-target-anchor="ListContactListParties" paginate-size-field="contactListPartiesSize" paginate-index-field="contactListPartiesIndex" list-name="contactListParties"> I suspect this patch does not play well with the use-row-submit in multi forms. Did anybody test that use case? > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: Jacques Le Roux > Fix For: SVN trunk > > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=comments#action_12458943 ]
Jacques Le Roux commented on OFBIZ-542: --------------------------------------- Si, Yes I tried it on some tables without problems. But unfortunatly not on forms using use-row-submit, sorry. > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: Jacques Le Roux > Fix For: SVN trunk > > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=all ]
David E. Jones reopened OFBIZ-542: ---------------------------------- Assignee: David E. Jones (was: Jacques Le Roux) In SVN rev 487657 Si reverted this patch because he found a problem with it: ================================== Reverting SVN r 486834. This caused a bug on certain types of forms where a column which should be there was not displayed properly. ================================== It would be nice to get more info so that the main issue can be fixed without causing other problem(s). In general, this patch was committed way too fast and without testing, which is a problem for framework level stuff. So, this is reopened and the initial patch while a starting point is not YET a solution. > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: David E. Jones > Fix For: SVN trunk > > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-542?page=comments#action_12459129 ]
Valentina Sirkova commented on OFBIZ-542: ----------------------------------------- I thought the problem was concerning forms of type "list" only, so my solution was addressing these types only. Now i will spend more time on researching and testing so i can handle all kinds of situations. Thanks: Valentina > Unnecessary extra cells on list based tables > --------------------------------------------- > > Key: OFBIZ-542 > URL: http://issues.apache.org/jira/browse/OFBIZ-542 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Reporter: Valentina Sirkova > Assigned To: David E. Jones > Fix For: SVN trunk > > Attachments: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/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_12462236 ] Valentina Sirkova commented on OFBIZ-542: ----------------------------------------- Hi, The first patch was causing a bug because of this line in it: if (!displayHyperlinkFieldIter.hasNext()) { // if the first while loop of the method renderHeaderRow in ModelForm.java (for example) gets into the break listEnd = true; // condition at the very last cell of the list, then the boolean condition will evaluate } // to false and the extra (header)cell for the fields different from display, display_entity and // hyperlink will not be opened and so a column will be lost. I have overlooked this situation in my first patch. My patch ModelForm.patch handles such kinds of situations. The general idea and solution behind this new patch is the same as the first, with a small fix of the described situation. 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: 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 |
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: ModelForm.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: ModelForm.patch, 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 |
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: ModelForm.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: 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 |
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_12462826 ] Jacques Le Roux commented on OFBIZ-542: --------------------------------------- Valentina, I tried to apply your patch but got a problem. Please take care when you (I suppose) change pathes by hand : you forgot a / at the beginning of lines 3 and 4. In case of doubt please try your patch having reverted concerned file(s) before, thanks. Si, Please in case of your use-case is in OpenTaps explain it clearly because I lost some time figuring this out (I use Apache trunk by default and in Marketing Appli ContactListForms.xml (3 matches) is of type list and not multi). Also in such case please may you provide a patch to access to functionnality (I don't use CRM/SFA much and it took me some time fo find where ListContactListParties is used ;o) ? Thanks. Finally, it seems that this patch has always a little problem : last column is showed as 1st row (see screencopy) ? Please Valentina can you check this ? 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: 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 |
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: AScreenCopy.PNG > 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 |
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_12462840 ] Valentina Sirkova commented on OFBIZ-542: ----------------------------------------- hi, You seem to have deleted the WRONG patch. The NEW patch was ModelForm.patch(as i have mentioned in my upper comment) NOT ModelForm2.patch. ModelForm2.patch is the OLD patch.The new patch -ModelForm.patch is fixing the problems you have mentioned, including the bad syntax. If you dont have it i will upload it tomorrow -Monday cause i dont have it here right now. 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 |
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_12462839 ] Jacques Le Roux commented on OFBIZ-542: --------------------------------------- Si, Sorry typo, please read "may you provide a path" and not "may you provide a patch", of course > 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 |
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_12462860 ] Jacques Le Roux commented on OFBIZ-542: --------------------------------------- Valentina, Ho ! Sorry, yes please re-submit your patch tomorrow, 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, 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 |
Free forum by Nabble | Edit this page |