Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1463

Data Scroller renders the paginator twice.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.9
    • 1.1.10
    • Data Scroller
    • None
    • Spring 2.5, MyFaces orchestra. Backing beans reagistred as Spring beans (request and conversation scopes).

    Description

      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.

          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);
                      }
                  }
              }
          }
      

      Attachments

        1. HtmlDataScrollerRenderer.java
          25 kB
          Marek Hawrylczak

        Activity

          People

            lu4242 Leonardo Uribe
            mhawrylczak Marek Hawrylczak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: