Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Dynamic parameter question - S2

Scott Nesbitt

2007-03-13

Replies:


I would like to have a url pass a parameter based on
the value of a field on the JSP. My code looks like
this:


<s:url id="historyUrl" action="LineupHistory"
includeParams="all">
 <s:param name="foo" value="%{barbar}"/>
</s:url>
<s:a href="%{historyUrl}">Lineup History</s:a>

<s:hidden name="barbar" value="%{'baz'}"/>


Sadly, in my action class this:

log.debug("In execute, parameters size: " +
parameters.size());

says zero.

If I use the name of a select tag instead of a hidden
the parameter has the first selection so I know my
parameter map is working. I just can't get it to use
a hidden tag.

Any suggestion?

Thanks for any tips or pointers,

Scott



____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.