Using pagging techniques - II
2 August 2008Continued from the last post …
To make like easy for the JSP developer, a pagination tag can be used that displays the total number of pages, the current page the user is on, and the links for the next page and previous pages if required. If the user is on the first page, no Previous page will display. Similarly, if the user is on the last page, no Next page displays. This in indeed trival stuff.
In a JSP page, we can put the tag to work like this:
<pagination-tag:pager start="<%=start%>" range="<%=range%>" results="<%=results%>"/>
For this tag library to work correctly, we must import the tag library at the top of the JSP page, which can be done like this:
<%@ taglib uri="http://paginationtag.miin.com" prefix="pagination-tag"%> or <%@ taglib uri="/WEB-INF/pagination.tld" prefix="pagination-tag"%> (provided you drop the tld in the /WEB-INF/)
continued …
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Using pagging techniques - II