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

Sumit Pandit commented on OFBIZ-5121:
-------------------------------------

Jacques, 
- Assigning a unique id is good option, I'll incorporate it. 
- As per MacroFormRenderer.java file concerned, didn't went through any such 
screen where it was used. But since same logic was observed and therefore for 
safer side, applied the check there as well.

BTW for now I will prepare a patch for MacroScreenRenderer.java changes.
                
> HTML Validation error - Duplicate DIV id is created in <screenlet title=.../> 
> tag.
> ----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-5121
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5121
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 11.04, SVN trunk, Release Branch 12.04
>            Reporter: Sumit Pandit
>            Priority: Critical
>         Attachments: OFBIZ-5121-1.patch
>
>
> When ID has not been provided in <screenlet title=.../> tag, The generated 
> DIV has an ID="_col". Including multiple screenlet in a page get result in 
> multiple DIVs with duplicate ID ("_col"). 
> For reference find duplicate div id("_col") in following page -  
> {code} 
> https://demo-trunk.ofbiz.apache.org/catalog/control/EditProdCatalogCategories?prodCatalogId=DemoCatalog
>  {code}
> Possible fix could be as follows - 
> {code:title="MacroScreenRenderer.java"}
> - parameters.put("collapsibleAreaId", screenlet.getId(context) + "_col");
> + if (UtilValidate.isNotEmpty (screenlet.getId(context))) {
> +     parameters.put("collapsibleAreaId", screenlet.getId(context) + "_col");
> + } else {
> +     parameters.put("collapsibleAreaId", null);
> + }
> {code}
> In similar way MacroFormRenderer.java can be modified.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to