On scroll pagination for richfaces
Is it possible to create lazy loading like pagination with richfaces? My idea would be to catch the event of scrolling on a spe开发者_运维知识库cific page and then rerender a part of the page.
So the flow would be
- create 10 search results on a search result page
- if the user scrolls
- Then reload the result region with 10 additional entries
An option would also be to create a Facebook like "more" bar and to rerender the region, when the user clicks on the button.
What do you guys think?
How about using the ScrollableDataTable ? Might not be what you want if your results are searchresults, but it might work still..
http://livedemo.exadel.com/richfaces-demo/richfaces/scrollableDataTable.jsf;?c=scrollableDataTable&tab=usage
If you want to automatically load more items as you scroll, you can create an anchor near the bottom of the page, and the detect when that anchor is visible, which will fire off an XHR request to re-load the component holding the results.
精彩评论