Hi All,
I want to implement pagination in my application using rich:datascroller.
But since datascroller requires all records to be available. What should I do if I want to load a list of 10 records when the user hits on label 1 of datascroller. and the next 10 records when user hits on 2.
I don't want to upload all the data in the list using query.
I used,
<rich:datascroller action="#{myBean.pagination}" pageIndexVar="currentPage" pagesVar="totalPages">
to track current page and total pages. The value of current page is always comes wrong while of totalPages always right.
How can I access both currentPage and totalPages in my session bean.
I dont know if seam has something specific but you can use the lazylist pattern.
http://www.ilikespam.com/blog/paging-large-data-sets-with-a-lazylist or google'ing lazylist pattern
will give you some ideas.