tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Noel <ericn...@mylife.ph>
Subject Re: [OT] Pager Tag Library v2.0 usage w/Tomcat 5
Date Mon, 19 Apr 2004 00:13:10 GMT
On 4/17/2004 10:05 AM, Tom K wrote:

> I have pagination working with Tomcat 5 through a bean. I like the
> “flexible” features that Pager Tag Library v2.0 has and would like to
> implement it in my jsp. I know I have everything configured correctly
> because I can get the paging to display but not more to the next or
> previous page.
>  
> Does anyone have an example code I can see. I just don’t understand the
> examples well enough on their web site HYPERLINK
> "http://jsptags.com/tags/navigation/pager/index.jsp"http://jsptags.com/t
> ags/navigation/pager/index.jsp
>  
>  
>  
>  
> TIA
>  
> Tom K.
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<%-- rs/datasource here --%>

<c:if test="${rs.rowCount > 0}">
     <pg:pager maxIndexPages="10"
         maxPageItems="15"
         export="pagerPageNumber=pageNumber" >
     <c:forEach var="row" items="${rs.rows}" varStatus="lineInfo">
         <pg:item>
             <c:out value='${row.field1}'/>
         </pg:item>
     </c:forEach>
     <pg:index>
	    <pg:first>
	        <a href="<%= pageUrl %>">first</a>&nbsp;
	    </pg:first>
	
	    <pg:prev>
	       <a href="<%= pageUrl %>">prev</a>&nbsp;
	    </pg:prev>
	
	    <pg:pages>
	       <a href="<%= pageUrl %>"><%= pageNumber %></a>&nbsp;
	    </pg:pages>
	
	    <pg:next>
	       <a href="<%= pageUrl %>">next</a>&nbsp;
	    </pg:next>
	
	    <pg:last>
	       <a href="<%= pageUrl %>">last</a>
	    </pg:last>
   </pg:index>
   </pg:pager>
</c:if>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message