0 Replies Latest reply on May 28, 2008 8:31 AM by thomasschumacher

    rich:datascroller not in sync with model

    thomasschumacher

      Hi,

      I build up a small GUI with a rich:dataTable as main content and a rich:datascroller for pagination support. On the top of the view the user can narrow the list by providing filter criteria. For example, by filtering the data, the list of records shrinks from 1000 to 60 and so the the number of pages shrinks from 60 to 3 as well.
      Unfortunately, the datascroller still renders a page navigation bar with 60 pages. After submitting the same form again (with identical filter parameters), the page navigation is correct. Here are the most important parts of the code:


      ...
      <h:commandButton styleClass="button" value="Search" action="#{nettabilityListBacking.filterData}" />
      ...
      <rich:datascroller binding="#{nettabilityListBacking.scroller}"
       for="nettabilityTable"
       maxPages="20"
       id="scroller"
       rendered="#{!empty nettabilityListBacking.nettingsFiltered}"/>
      ...
      <rich:dataTable id="nettabilityTable"
       value="#{nettabilityListBacking.nettingsFiltered}"
       var="netting"
       rows="20">
      <rich:column>
      ...
      </rich:column>
      ...
      </rich:dataTable>
      


      I discovered a workaround: By defining a redirect (to the same page) in faces-nav.xml, everything works fine. But it seems to be not a good solution to define redirects everywhere just to make the datascroller working as it should.

      Any help is appreciated.

      Regards
      Thomas