3 Replies Latest reply on Jul 21, 2008 7:19 AM by dragospd

    datascroller maxPages attribute doesn't work?

    dragospd

      Hello, I have a datascroller component that controls a table with a lot of rows (more than 10000):

      <rich:datascroller for="tblCatalogContent" maxPages="10" stepControls="auto"
       align="right" id="scrollCatalogContent"
       renderIfSinglePage="false"
       scrollerListener="#{catalogLineDataModel.invalidate}" />


      The rows attribute of the table is set to 10. The datascroller displays all the page navigation controls (10000/10 = 100+) and the page becomes extremely large.

      My understanding is that the maxPages attribute of the datascroller limit the maximum of the displayed page controls in datascrollerbut it seems that it doesn't.

      I use richfaces 3.20

      Thanks for any help


        • 1. Re: datascroller maxPages attribute doesn't work?
          dragospd

          I forgot to mention that the dataTable and datascroller are included in a page from a tabPanel control with ajax switchType

          • 2. Re: datascroller maxPages attribute doesn't work?
            ilya_shaikovsky

            I've checked under latest version - works ok. Could you please update your RF libs at least to latest release?

            • 3. Re: datascroller maxPages attribute doesn't work?
              dragospd

              now I found the cause of this issue. Is not the library fault. Due to the fact that the datascroller is not updated automatically when the datatable model is updated I wrote a small hack that alters the maxPages scroller attribute. unfortunately I realized now that it have unpleasant side effects...

              the scenario is like this:
              one table have 11 rows, the datascroller displays 10 rows per page so I have two pages. I am in page #2. The user delete one row and refresh the page. Logically there is no more page #2 and I should display page #1 without any pagination control for page #2. Is there a simple way to do this?

              thanks