1 Reply Latest reply on Mar 20, 2007 12:07 PM by amitev

    Datascroller duplicate getRowData() requests problem

    msgj

      Hi,
      I'm using rich:dataScroller and rich:dataTable to display large data set. I have implemented DataModel with lazy data loading. Everything works fine, except of two things:
      1. When switching to some page getRowData() is called multiple times for each row (four times), like this:
      getRowData(N)
      getRowData(N+1)
      ..
      getRowData(N+PageSize-1)
      getRowData(N)
      getRowData(N+1)
      ..
      getRowData(N+PageSize-1)
      ...
      ...

      When dataScroller/dataTable is initializing for the first time (when page loads) getRowData() is called as excepted - only one time for each row.


      2. It is impossible to go to other page than maxPages attribute states. If I click on page maxPages+N button, then some earlier page is loaded (<= maxPages). But if I click "fast step" or "last page" button - then I can reach page beyond maxPages..

        • 1. Re: Datascroller duplicate getRowData() requests problem
          amitev

          1. In the JSF spec is never told that the getters will be invoked only one time. One approach is to use use scrollerListener and there to load the data from the database. The other way is to use request scope variable to check if the action method is invoked already for the current request.