views:

113

answers:

0

Using richfaces 3.3.0 we have a rich:dataTable with sortyBy's in the rich:column components and with a rich:dataScrolling component.

These allow the user to sort the table in any way they want and go through the pages, all in client memory.

Usually our users spend a long time looking for a certain row by sorting and browsing the pages, will click on a link which brings them to another page, do something and click on another link which brings them back to the page with the dataTable. But now the sorting has gone back to default and page has gone back to 1. Our users are annoyed by this.

So i am trying to find a way to store the current state of sorting of the table and the page into my managed bean in a way i can restore them the next time the user visits the page.

I figured i can store the current page by referencing to bean variables in the pageIndexVar and pagesVar attributes in dataScrolling, but so far I am completely clueless on how to do this with the sorting.