It's not a secret anymore!
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pagination in scriplet code" Watch "Pagination in scriplet code" New topic

Pagination in scriplet code

Arthur Ford

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">
<th class="reportheader" rowspan="2">Da (mm/dd/yyyy)</th>

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

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


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

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

</table></pg aging>
I agree. Here's the link:
subject: Pagination in scriplet code
It's not a secret anymore!