How to implement pagin开发者_如何学JAVAg in JSF 1.1?
Create a DAO class which can return subsets of results by firstrow
and rowcount
, create a bean which holds information about the firstrow
and rowcount
and the current subset of data, create a JSF page which displays the data using <h:dataTable>
and has a bunch of <h:commandButton>
s to invoke paging actions (just do the math based on firstrow
and rowcount
).
You can find more information and code examples in this article, it even covers sorting.
I used Richfaces Datascroller
精彩评论