Spring data "Page" provides a good abstraction for a Page of records, and has fields to access the current page that is being displayed, the count of all the records and the page size.
A good pager control can be built in jsp, given a Page of records, something like the following:
I have created a small gist with just such a jsp tag library, and it internally displays this pager using twitter bootstrap based styling. Using this tag library is simple, it just requires a "Page" as an attribute:
Here is a copy of the gist:
A good pager control can be built in jsp, given a Page of records, something like the following:
I have created a small gist with just such a jsp tag library, and it internally displays this pager using twitter bootstrap based styling. Using this tag library is simple, it just requires a "Page" as an attribute:
<util:pagination thispage="${aPage}"></util:pagination>
Here is a copy of the gist: