aspose file tools*
The moose likes Struts and the fly likes Pagination in scriplet code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pagination in scriplet code" Watch "Pagination in scriplet code" New topic
Author

Pagination in scriplet code

Arthur Ford
Greenhorn

Joined: Sep 06, 2006
Posts: 22
I tried this code for pagination. Pls dont shoot me. Did I over do stuff? Is there an easy way to do it? How can achieve this using JSTL or struts tags??


[ September 22, 2006: Message edited by: Arthur Darklord ]
arjun rampal
Ranch Hand

Joined: Jul 08, 2005
Posts: 125
use this library
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="pg" %>

<tiles:insert definition="mainLayoutDef"></tiles:insert>
<div id="IATAAuditReport" class="content">
<pg aging pageSize="30">
<table id="table1" border="0" cellpadding="2" cellspacing="1" frame="box">
<tr>
<th class="reportheader" rowspan="2">Da (mm/dd/yyyy)</th>
<
</tr>

<logic:iterate id="element" name="dateMap">
<%
num++;
if((num % 2) == 0) {
bgColor = SLATE;
} else {
bgColor = WHITE;
}
%>
<pg:item>
<tr bgcolor="<%= bgColor %>">





<logic:notPresent name="element" property="value">
0
</logic:notPresent>

</td>


<logic:notPresent name="element" property="value">
0.00
</logic:notPresent>

</td>
</tr></pg:item>
</logic:iterate> <pg:index>
<pg age><%=thisPage%></pg age>
</pg:index>

</table></pg aging>
</div>
</body>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pagination in scriplet code