Thanks Adam - that's good to know.

-----Original Message-----
From: Adam L [mailto:[EMAIL PROTECTED] 
Sent: Monday, 16 February 2004 2:10 PM
To: Struts Users Mailing List
Subject: Re: html:link passing multiple parameters

There's also the use of c:url.  The catch there is that if you incude the
resulting url in a html:link, it will be double contexted, which means you
should use a standard href tag and use a c:out to spit out the final url.


----- Original Message -----
From: "Nick Faiz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Sunday, February 15, 2004 4:39 PM
Subject: RE: html:link passing multiple parameters


> I did something along those lines using Struts-EL.
>
> <c:set var="concernType" value="${project.progressConcernType}"
> scope="request"/>
>
> <jsp:useBean id="paramMap" class="java.util.HashMap" />
>
> <c:set target="${paramMap}" property="projectIdentifier"
> value="${project.projectIdentifier}" />
>
> <c:set target="${paramMap}" property="concern"
> value="${concernType}" />
>
>
>
> <html-el:link action="advanceProjectConcern.do"
> name="paramMap" >
> >>
> </html-el:link>
>
>
> Why bother with bean:write when you can use c:set ?
>
> Nick Faiz
>
> -----Original Message-----
> From: phortonpeg [mailto:[EMAIL PROTECTED]
> Sent: Monday, 16 February 2004 9:34 AM
> To: [EMAIL PROTECTED]
> Subject: html:link passing multiple parameters
>
> Hi,
> I have a situation where I need to pass several parameters in an
> html:link tag.  From what I've read, I know that I must use a HashMap
> to send as a param which would contain the values I want to send to
> the URL.  I first display the values in a table using logic:iterate
> and an arrayList onto the screen.  The user should then be able to
> select a row and send that row's parameters to an action class that
> produces a pdf.
>
> My problem is how to extract the values from bean:write properties
> and load them into a hashMap.  What would be the correct syntax to do
> this something like this? I've tried several ways to do something
> like the following without any luck :
>
> <% String docNumber = <bean:write name="task"
> property="documentNumber"/> ; %>
>
> Here is a portion of the jsp that I am working with:
>
>   <logic:iterate id="task"  name="productionQcForm"
> property="documents" >
>         <td class="data"><bean:write name="task"
> property="docGid"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="revision"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="pgCount"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="statDate"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="itemVkey"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="title"/>&nbsp;</td>
>         <td class="data"><bean:write name="task"
> property="autoReject"/>&nbsp;</td>
>         <html:hidden name="task" property="altGid" />
>         <html:hidden name="task" property="supplement" />
>         <html:hidden name="task" property="chgType" />
>         <html:hidden name="task" property="society" />
>         <html:hidden name="task" property="documentNumber" >
>         <html:hidden name="task" property="order" />
>  <%
>  java.util.HashMap myMap = new java.util.HashMap();
>
>  myMap.put("docGid", "How do I get the value of the property "docGid
> from the list above???");
>  myMap.put ("docNumber", documentNumber);
>  myMap.put ("order", order);
>  myMap.put ("society", "society");
>  myMap.put ("statDate", "statDate");
>  myMap.put ("vKey", "itemVkey");
>  myMap.put ("supp", "supplemenat");
>  myMap.put ("chgType", "chgType");
>  myMap.put ("revision", "revision");
>  pageContext.setAttribute("map", myMap);
>
> %>
>         <td class="data" align="center">
>            <html:link page="/showScannerPdf.do" name="map" >
>                <html:img src="images/EditBCard.gif"
> altKey="action.properties"
>                   width="20" height="20" border="0"/>
>            </html:link>
>        </td>
>
>
> Any ideas or suggestions would be very appreciated!
> Thanks for you help!
>
> Peggy
>
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>

---------------------------------------------------------------------
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]

Reply via email to