Here's what I do as a workaround for this. I'm sure you could easily
enhance this to convert all your request parameters into a URL with
name/value pairs.
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="org.apache.struts.util.MessageResources,
org.apache.struts.Globals"%>
<%
MessageResources resources =
(MessageResources) request.getAttribute(Globals.MESSAGES_KEY);
String searchTerm = "";
String action = request.getParameter("action");
if ("search".equalsIgnoreCase(action)) {
if (request.getParameter("searchBy") != null) {
searchTerm = "&searchBy="+request.getParameter("searchBy");
}
}
%>
<%-- For linking to edit screen --%>
<bean:struts id="thisURL" forward="searchChangeRequests"/>
<bean:struts id="editURL" forward="editChangeRequest"/>
<display:table name="userCrList" cellpadding="0" cellspacing="0"
requestURI='<%=request.getContextPath()+thisURL.getPath()+searchTerm%>'
scope="request" pagesize="20" styleClass="list">
HTH,
Matt
-----Original Message-----
From: Mark F [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 1:25 PM
To: Tomcat Users List
Subject: Display Tag, Tiles and Paging
I have an ArrayList that is a collection of JavaBeans containing three
attributes id, name, ssn. It is working well with the display column like
this:
<div>
<display:table name="results" width="45%" pagesize="10" cellpadding="3"
cellspacing="0" border="0" requestURI="/SearchForm.do" summary="Table
summary - Listing of medical records contained in docbase for the given
name">
<display:column property="name" title="Name" sort="true" />
<display:column property="ssn" title="SSN" sort="true"
autolink="true" paramId="rid" paramProperty="id" href="/GetObjectByRid" />
<display:setProperty name="sort.behavior" value="list" />
<display:setProperty name="paging.banner.include_first_last"
value="true" />
</display:table>
</div>
The paging and sorting do not work. It seems that I need to give it a
requestURI parameter, but this causes the app to loose the request scoped
values (the name that was searched on). It appends on some new URI
parameters (page, order and sort). I found some examples on the developers
site that allowed me to get this far but nothing on what needs to be in
place before-hand to make this work. Also tiles definitions do not work in
the requestURI parameter.
Thanks,
-Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]