Gotag Readme
Forced to do pagination on the Web page recordset, I realized this label for pagination, sharing with you.
This is a simple page tab for Web pages. This tab allows you to page through the incoming recordset, and you can control the number of records displayed per page by setting the parameters. User interface is also relatively simple and practical, provide the first page, last, Prev, next page and direct jump way to specify the page to display the recordset you need.
How to use:
Put the Go-1.0.jar in your Web-inf/lib directory.
Introducing labels on a page
JSP code
<%@ taglib prefix= "Go" uri= "Http://www.zlex.org/tag/go"%>
You can refer to the following code for use:
JSP code
<% list<string> List = new arraylist<string> ();
for (int i = 1; I <= i++) {List.add (string.valueof (i));} request.setattribute ("list", list); %> <c:set var= "Gourl" value= "go.jsp?method=list" scope= "request"/> <c:choose> <c:when test= "${empty Param.pageno} "> <c:set var=" PageNo "value=" 1 "scope=" request "/> </c:when> <c:otherwise> <c: Set var= "PageNo" value= "${param.pageno}" scope= "Request"/> </c:otherwise> </c:choose> <go:go url= "$ {Gourl} "pageno=" ${pageno} "Pagenoname=" ${pageno} "source=" ${list} "Pagelistname=" ${pagelist} "pageSize=" 5 "> < div> <br/> <c:foreach items= "${pagelist}" var= "L" > <c:out value= "${l}"/> <br/> </c:forE ach> <br/> </div> <span> <go:pageno/> page, total <go:pagecount/> page </span> <span >[<a href= "<go:first/>" > Home </a>]</span> <span>[<a href= "<go:last/>" > Last </a>]</span> <span>[<a href= "<go:previous/>" > Prev </a>]</span> <span>[<a href= "<go:next/>" > Next </a>]</span> <span> jump to page <go:select/> page </span> </go: Go>