struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitch...@apache.org>
Subject Re: Adding parameters to a link
Date Fri, 03 Dec 2004 04:48:46 GMT
This may not be the best approach, but this works for me... (if you can use 
JSTL)



<jsp:useBean id="linkParams" class="java.util.HashMap"/>
<c:set target="${linkParams}" property="parcel"
 value="${ParcelSearchForm.concatenateAddress}"/>

<logic:iterate id="result"
  name="ParcelSearchForm" property="results">
 <tr>
  <td>
   <html:link forward="ParcelResult" name="linkParams">
    <bean:write name="result" property="parcel"/>
   </html:link>
  </td>
  <td><bean:write name="result" property="year"/></td>
  <td><bean:write name="result" property="parcelStatus"/></td>
  <td><bean:write name="result" property="concatenateAddress"/></td>me
 </tr>
</logic:iterate>



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

----- Original Message ----- 
From: "Randall Svancara" <rsvancara@adaweb.net>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Thursday, December 02, 2004 8:08 PM
Subject: RE: Adding parameters to a link


Thanks, I will check google on the proper way to implement this.  It sounds 
like a hassle to me.  I am doing my best to adopt struts and the model view 
controller paradigm.  It seemed so easy to just hack out some code and 
deploy it.

Randall

________________________________

From: Jim Barrows [mailto:jbarrows@sssc.com]
Sent: Thu 12/2/2004 5:50 PM
To: Struts Users Mailing List
Subject: RE: Adding parameters to a link



> -----Original Message-----
> From: Randall Svancara [mailto:rsvancara@adaweb.net]
> Sent: Thursday, December 02, 2004 4:01 PM
> To: user@struts.apache.org
> Subject: Adding parameters to a link
>
>
> I am new to struts. I am trying to add parameters to a link using
> <html:link>someplace</html:link>.  Here is the code below.  For each
> iteration, I want to create a dynamic link.
>
>     <logic:iterate id="result" name="ParcelSearchForm"
> property="results">
>     <tr>
>     <td><html:link forward="ParcelResult" paramName="ParcelSearchForm"
> paramId="parcel" paramProperty="concatenateAddress"><bean:write
> name="result" property="parcel"/></html:link></td>
>     <td><bean:write name="result" property="year"/></td>
>     <td><bean:write name="result" property="parcelStatus"/></td>
>     <td><bean:write name="result"
> property="concatenateAddress"/></td>me
>     </tr>
>     </logic:iterate>

You're going to have to build a hashmap of the items you want and pass that 
off to html:link to get this to work.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org







--------------------------------------------------------------------------------


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message