Malcolm I've been reading throughthe documentation for the taglib, and I'm getting the impression that the collectionof things I'm interating over has to exist in it's entirety in server memory. Is that true? This is slightly problematic for me because it's a large collection of data (I know, I should push back on the user...it's along story)
My questions are.... 1. how does it know what the collection is that I'm iterating through 2. what are you using the "<pg:param name="action" value="search"/>" for? currently ,y I've included my jsp for reference... Any help is appreciated. John Mattos Sr. Developer and Architect iNDEMAND 345 Hudson St. 16th Floor New York, New York 10014 --- My JSP--- <pg:pager> <TABLE border="1"> <TBODY><tr> <th colspan="13" align="center">View Valid Transactions</th></tr> <TR> <TR> <Th>Type</Th> <Th>Status</Th> <Th>Org Id</Th> <Th>Org Name</Th> <Th>Channel</Th> <Th>Product Title</Th> <Th>Signal Type</Th> <Th>Event #</Th> <Th>Deal</Th> <Th>Retail</Th> <Th>Buys</Th> <Th>Amount Due</Th> <Th>Post Date</Th> </TR> <pg:item> <logic:iterate id="buyTransaction" type="com.indemand.indab.application.invoice.BuyTransaction" collection="<%=valids%>"> <TR> <TD ALIGN="LEFT"><%=buyTransaction.getType()%> </TD> <TD ALIGN="LEFT"><%=buyTransaction.getStatus()%> </TD> <TD ALIGN="RIGHT"><%=buyTransaction.getOrgId()%></TD> <TD ALIGN="LEFT"><%=buyTransaction.getAffiliateFullName().trim()%> </TD> <TD ALIGN="RIGHT"><%=buyTransaction.getChannel()%> </TD> <TD ALIGN="LEFT"><%=buyTransaction.getAssetTitle()%> </TD> <TD ALIGN="CENTER"><%=buyTransaction.getTiertype()%> </TD> <TD ALIGN="RIGHT"><%=buyTransaction.getIndAsstId()%> </TD> <TD ALIGN="RIGHT"><%=buyTransaction.getDealTerm()%> </TD> <TD ALIGN="RIGHT">$<%=buyTransaction.getTransAmt()%> </TD> <TD ALIGN="RIGHT"><%=buyTransaction.getBuys()%> </TD> <TD ALIGN="RIGHT">$<%=buyTransaction.getTotalTransAmt()%></TD> <TD ALIGN="CENTER"><%=buyTransaction.getPostDate()%> </TD> </TR> </logic:iterate> </pg:item> <TR> <TD colspan="13" Align="center"> <pg:index> <pg:prev> <a href="<%= pageUrl %>">[ (<%= pageNumber %>) << Previous ]</a> </pg:prev> <pg:pages> <a href="<%= pageUrl %>"><%= pageNumber %></a> </pg:pages> <pg:next> <a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %>) ]</a> </pg:next> </pg:index> </pg:pager> </TD> </TR> </table> --- END --- -----Original Message----- From: Malcolm Wise [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 4:32 AM To: 'Struts Users Mailing List' Subject: RE: paging taglib and struts? John, I am using this taglib quite extensively and it works very well with Struts. Below is a fairly basic example jsp. Essentially, the pager url attribute specifies the destination when any of the navigation links is clicked. Request parameters required by the action class can be specified using the param tag. These can be literals (value="search") as in my example or use <bean:define> and specify the value attribute as the resulting variable (value="<%=expr%>"). The item tag defines each row to be displayed, and needs to be enclosed within <logic:iterate>. The index tag defines the navigation bar (prev, next etc) as a series of hyperlinks. The maxIndexPages attribute of the pager tag defines how many page numbers will be displayed in the navigation bar, i.e the below example will display [<<Prev] 1 2 3 4 5 6 7 8 9 10 [Next>>] assuming there are 10 pages worth of data. [<<Prev] and [Next>>] only display if there are previous or more pages. The maxPageItems attribute specifies how many detail rows per page to be displayed. I'm happy to answer any further questions or give examples. Cheers Malc <pg:pager url="AdvancedSearch.do" maxIndexPages="10" maxPageItems="15"> <pg:param name="action" value="search"/> <TABLE width="100%"> <TR> <TD align="center"> <TABLE width="60%" border="0"> <TR> <TH width="10%"><bean:message key="partnum.ecnsearchresults.ecnid"/></TH> <TH width="20%"><bean:message key="partnum.ecnsearchresults.model"/></TH> <TH width="10%"><bean:message key="partnum.ecnsearchresults.releasedate"/></TH> <TH width="10%"><bean:message key="partnum.ecnsearchresults.status"/></TH> </TR> <logic:iterate id="row" name="results" scope="request" type="com.sony.sde.sql.Row"> <pg:item> <TR> <TD><bean:write name="row" property="string[1]"/></TD> <TD><bean:write name="row" property="string[2]"/></TD> <TD><bean:write name="row" property="string[3]"/></TD> <TD><bean:write name="row" property="string[4]"/></TD> </TR> </pg:item> </logic:iterate> </TABLE> <TABLE width="60%" border="0"> <TR><TD> </TD></TR> <TR align="center"> <TD> <pg:index> <pg:prev><a href="<%=pageUrl%>">[<< Prev]</a> </pg:prev> <pg:pages> <bean:define id="pageNo" value="<%=pagerPageNumber.toString()%>"/> <logic:equal name="pageNo" value="<%=pageNumber.toString()%>"> <%=pageNumber%> </logic:equal> <logic:notEqual name="pageNo" value="<%=pageNumber.toString()%>"> <a href="<%= pageUrl %>"><%= pageNumber %></a> </logic:notEqual> </pg:pages> <pg:next><a href="<%= pageUrl %>">[Next >>]</a> </pg:next> </pg:index> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </pg:pager> -----Original Message----- From: John Menke [mailto:[EMAIL PROTECTED]] Sent: 03 March 2002 02:08 To: struts-user Subject: paging taglib and struts? Does anyone any suggestions for implementing paging with struts? I have searched the archive and karl basel posted this: <snip> There's a good pager taglib at jsptags.com. I've used it in a struts app and does the job quite well when embedded in the iterate tags. <logic:iterate> <pg:item> Item Details </pg:item> </logic:iterate> <snip> I have downloaded this pager and the documentation is not providing enough information on how this works. Are there any examples out there on how to do this that I am missing? -john -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ************************************************************************* The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited ************************************************************************* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>