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
         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.

Reply via email to