1 Reply Latest reply on Sep 25, 2008 5:48 AM by cash1981

    rich:datascroller, request-scope data model and filtered tab

    geggle

      I have a data table with an attached scroller that is backed by a request-scope bean.

      The request scope bean extracts rows from a large database table. It has properties on the model that are used to restrict the rows shown - for example, only those rows which match a certain search criteria are shown.

      Everything works great except the data scroller. When a page is selected in the scroller the page displayed is always 1.

      From what I can see, the scroller's current page number is set during the apply request values phase. At this point in time, none of the model properties have been bound, so when the scroller asks the model for the row count, the size of the result set is unknown (the search criteria are unset) and the row count is zero. This means that the page will always be reset to 1.

      Is there a method to work around this behaviour?

        • 1. Re: rich:datascroller, request-scope data model and filtered
          cash1981

          The problem is that your bean is probably less than session scope. Just for debugging purposes, try to put your bean as ScopeType Session and see if the datascroller works.

          If you cannot have your bean as Session then what you can do is use a4j:keepAlive and put your bean in that keepAlive. However I have not managed to get the latter working, but if you get it to work I would be happy if you inform me how.