Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination in scriplet code

 
Arthur Ford
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic