0 Replies Latest reply on Aug 16, 2008 2:06 AM by Alireza Salimi

    PageCount in rich:datascroller

    Alireza Salimi Newbie

      Hi guys

      Is there any way to tell rich:datascroller, the total number of pages or records, it is going
      to show?

      As long as I know and from reading the source code of RichFaces and MyFaces,
      it seems that it does this automatically by calling the backing bean's method and
      dividing the return value by the "rows" attribute of datatable.

      I think that this method is inefficient, because backing bean has to return all data all at once
      and this data must be kept in memory. On the other hand, if the backing bean just returns
      the data for the current page in datascroller -by getting the current page's number-, datascroller infers that the total number of pages which is to be shown is just one page.

      I hope I have explained the problem clear enough.
      Thanks in advance