struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sri Sankaran <>
Subject RE: Multiple pararmeters from multiple links
Date Thu, 06 Jun 2002 15:10:27 GMT

While I don't have an answer to your question, I have an alternative.

An alternate strategy would be to include a getParameters() method in the object you are iterating
over.  This method should have access to the current values of the id, firstName and lastName.
 It would return a Map containing the necessary parameters.  Your <html:link> would
then be:

<html:link page="/do/NameSearch/Details" 

Hope this helped.


-----Original Message-----
From: Mark Nichols []
Sent: Thursday, June 06, 2002 10:56 AM
To: Struts User
Subject: Multiple pararmeters from multiple links

All -

I have a JSP which displays multiple rows of data. Each row starts with a
link based on the first column of data. The subsequent action class needs to
be passed the first three column values as parameters, like so:


In reading the archives I have come up with this:


<!-- a bean to hold the id:name pair needed for the request this page will
submit -->
<jsp:usebean id="parms" class="java.util.HashMap" scope="page" />


     <logic:iterate id="results" name="nameSearchResults" scope="session"
      <!-- <%= results %> -->
    <dhshtml:row oddColor="#cddbeb" evenColor="#ffffff"
evenStyleClass="text" oddStyleClass="text">
     <td bgcolor="FFFFFF">&nbsp;</td>
      <!-- populate the HashMap -->
       parms.put("id",request.getParameter("id")) ;
       parms.put("lastName",request.getParameter("lastName")) ;
       parms.put("firstName",request.getParameter("firstName")) ;
      <html:link page="/do/NameSearch/Details" name="parms" scope="page">
<!-- clientName is a combination of two other attributes, lastName &
firstName -->
       <bean:write name="results" property="clientName"/>
     <td><bean:write name="results" property="address"/></td>
     <td><bean:write name="results" property="city"/></td>
     <td><bean:write name="results" property="state"/></td>
     <td><bean:write name="results" property="clientBirthdate"/></td>
     <td><bean:write name="results" property="ssn"/></td>


However, when I compile this I get the following message:

JavaCompile: parms cannot be resolved.

How do I get the parms reference inside my iterate loop to resove?


mark n.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message