myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (TOMAHAWK-1463) Data Scroller renders the paginator twice.
Date Thu, 19 Aug 2010 20:43:20 GMT

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

Leonardo Uribe updated TOMAHAWK-1463:
-------------------------------------

           Status: Resolved  (was: Patch Available)
         Assignee: Leonardo Uribe
    Fix Version/s: 1.1.10-SNAPSHOT
       Resolution: Fixed

Thanks to Marek Hawrylczak for provide this patch. In theory that should not happen, because
transient components should be removed from the tree before save state, but a check on encodeChildren
does not harm.

> Data Scroller renders the paginator twice. 
> -------------------------------------------
>
>                 Key: TOMAHAWK-1463
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1463
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.9
>         Environment: Spring 2.5, MyFaces orchestra. Backing beans reagistred as Spring
beans (request and conversation scopes).  
>            Reporter: Marek Hawrylczak
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: HtmlDataScrollerRenderer.java
>
>
> In my environment every subsequent request causes a  paginator renders the page links
twice.
> The links are renderd twice, once by encodeChildren method then by renderPaginator method.
> I had to create a simple patch to ignore page links in encodeChildren method.
> {code}
>     public void encodeChildren(FacesContext facescontext, UIComponent uicomponent)
>                     throws IOException
>     {
>         RendererUtils.checkParamValidity(facescontext, uicomponent, HtmlDataScroller.class);
>         if (uicomponent.getChildCount() > 0)
>         {
>             HtmlDataScroller scroller = (HtmlDataScroller) uicomponent;
>             String scrollerIdPagePrefix = scroller.getId() + HtmlDataScrollerRenderer.PAGE_NAVIGATION;

>             for (Iterator it = uicomponent.getChildren().iterator(); it.hasNext(); )
>             {
>                 UIComponent child = (UIComponent)it.next();
>                 String childId = child.getId();
>                 if (childId != null && !childId.startsWith(scrollerIdPagePrefix)){
>                     RendererUtils.renderChild(facescontext, child);
>                 }
>             }
>         }
>     }
> {code}

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


Mime
View raw message