sorting extendeddatatable in richfaces
does anyone know how exactly the default sorting works in richfaces datatable columns? (using sortby)
My problem is that once a sort has been performed, the new data order is never preserved in my backing's bean data model (which makes me wonder where is this new order now stored?), that is the actual datamodel always contains just the original data.. So if say user goes to a another page and returns to what should be sorted data (using back button) , the data开发者_如何学Python displays as original, not sorted.. Has anyone come across this?
also, is there a way to do server side sorting, i.e. call my own sort method upon clicking the header..?
many thanks for any advice!
also, is there a way to do server side sorting, i.e. call my own sort method upon clicking the header..?
A similar question here. look for the accepted answer.
so if say user goes to a another page and returns to what should be sorted data (using back button) , the data displays as original, not sorted.. Has anyone come across this?
Sorting is done via client side in RichFaces, so if you use the backend solution above, you can save the sorting in the bean and use it when the user returns to the page. You will have to define the bean as SessionScope
or alternatively define a Singleton
class that will save the sorted collection.
精彩评论