aspose file tools*
The moose likes Struts and the fly likes use html:link  pass two param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "use html:link  pass two param" Watch "use html:link  pass two param" New topic
Author

use html:link pass two param

javen fang
Greenhorn

Joined: Jun 29, 2003
Posts: 4
I have a bean list that have two property id / name

And how can I pass the second parameter name after the action next.do??
Thanks.


I believe I can fly<br />...................<br /> Just do it !!!
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
If you need multiple request parameters, make use of a map:
<html:link action="/viewOrder"
name="paramMap">
Some Link
</html:link>
Or:

<html:link action="/viewOrder"
name="someBean"
property="paramMap">
Some Link
</html:link>

Specify the name (and optional property) attributes to select a java.util.Map bean(paramMap) that contains one or more parameter ids and corresponding values.
HTH
Sahil


Adios
Franck Tranchant
Ranch Hand

Joined: Aug 07, 2003
Posts: 75
This method with Map for multiple parameters works fine but you'll have to insert Java in your JSP...
I think that was what Sandy was talking about.
<%
java.util.HashMap params = new java.util.HashMap();
params.put("id", "idValue");
params.put("name", "nameValue");
pageContext.setAttribute("paramsName", params);
%>
<html:link page="next.do" name="paramsName" scope="page"> next action </html:link>
[ November 05, 2003: Message edited by: Franck Tranchant ]

Franck<p>--------------------
 
Consider Paul's rocket mass heater.
 
subject: use html:link pass two param