Please check livedemo for example.
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.
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?
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.
Walk is called for 2-4 and 6th (if component is being rendered) phases of JSF lifecycle.