-
1. Re: rich:datatable database-level pagination and sorting
nbelaevski Jul 28, 2009 5:17 AM (in response to javaz)Hi,
Please check livedemo for example. -
2. Re: rich:datatable database-level pagination and sorting
javaz Jul 28, 2009 12:07 PM (in response to javaz)Hi,
thanx for the reply.
Unfortunately the example in live demo doesn't fit my needs...
The modify method is always called after the walk method, the one that performs data loading because there I have pagination data.
I think this design suits well for in-memory sorting or data manipulation when I already have the data. In my case I have to reload the data when I get the sorting info from the datatable.
Any idea? -
3. Re: rich:datatable database-level pagination and sorting
nbelaevski Jul 28, 2009 6:01 PM (in response to javaz)That's strange, modify() should be called before walk(); otherwise it'll be working incorrect. And as you can see, the example works ok with DB - sorting, filtering and pagination - everything is done there.
So, can you please clarify more? -
4. Re: rich:datatable database-level pagination and sorting
javaz Jul 29, 2009 12:29 PM (in response to javaz)I'm experiencing a strange behavior.
When I click the column for sorting the first time, I see the walk method called many times, then the modify method (couple of times) and then again the walk method many times.
Next clicks I see the modify method called, then the walk method (many times), then the modify again and then the walk method (many times).
I took a closer look at the livedemo example and I noticed that you had to manage by yourself this multiple method invocations caching the result list and to compare the range object to avoid multiple calls to database.
I have adapted my code to work this way. -
5. Re: rich:datatable database-level pagination and sorting
nbelaevski Jul 29, 2009 6:23 PM (in response to javaz)Walk is called for 2-4 and 6th (if component is being rendered) phases of JSF lifecycle.