• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

use html:link pass two param

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic