[ 
https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678043#action_12678043
 ] 

milan_majercik edited comment on TOMAHAWK-596 at 3/2/09 9:56 AM:
-----------------------------------------------------------------

Attached is a fix that sorted out this issue in portlet environment. The fix 
prevents repeated addition of HTML link component to the data scroller that was 
a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8

The difference with the original patch issued by Ryan Wynn is that it doesn't 
comment out the the encodeChildren method although i think there is an ample 
reason for it as the data scroller is not supposed to have any children and 
UICommand components that wrap everything inside facets are not component 
children

      was (Author: milan_majercik):
    Attached is a fix that sorted out this issue in portlet environment. The 
fix prevents repeated addition of HTML link component to the data scroller that 
was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8
  
> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, 
> HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, 
> HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the 
> faces tree is rendered if the faces tree contains a DataScroller component.  
> The HtmlDataScroller renderer actually renders its children twice in this 
> case, once in the encodeChildren method and once in the encodeEnd method.  
> Since rendering of the children is taken care of in encodeEnd I made the 
> encodeChildren method a no-op.  Also, although the  CommandLinks which are 
> rendered as children are marked as transient, they see to stick around.  I 
> put a check in the getLink methods to make sure that the links are not added 
> twice.  This seems to fix the duplicate id exception, but it might be 
> necessary to further investigate why they are sticking around in the first 
> place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to