Another way to do pagination is by using displaytag..
http://www.displaytag.org/1.2/
Depending on your non functional requirements... especially the system response time...you may choose a client side pagination or server side pagination.
displayTag is server side pagination.
Few questions about client side pagination..
1. If you have 50 items to display in a page why should the server send all (say around 50000) items to the client?. How much response time and bandwidth you will save if you limit the retry to the page length?
2. Can the limitation to the view (number of items) be passed to the retry mechanism?
3. Do you have sorting to do? if so can it be done at retry side?
4. Are you caching the data in business layer or in session? If you are caching the data, client side pagination is better. But whether to cache or not is a different question.
5. Is your application clustered?
6. Can other users update the data store while one user is viewing?
7. A user can manually go through 8 to 10 pages at a time. If there are 100's of such pages a search/filter utility could limit the number of items.
If the total number of items is negligible, client side pagination is OK.