For your posted example, where that value you want to pass is the value you're rendering in the hidden field, you can just use the same OGNL expression in both places:

    ...
    <s:param name="foo" value="%{baz}"/>
    ...

If that hidden input's field is being changed by client-side Javascript, though, or needs to come from a a user input/selection, then you'll have to use Javascript to build/modify the href for the link, too.

There's no way a server-side, render-time OGNL expression can ever reference dynamic user inputs/selections.

L.

Scott Nesbitt wrote:
Hmm, I see your point.  I do not really need to do any
fancy Ajax stuff here, I just want an action invoked
by a url link to have access to what was selected on
the page (which I was going to stuff into a hidden
field.)

I know I can do this with a form and submit button,
but surely there is a way to do this with a link,
correct?

Thanks for the response,

Scott

--- Dave Newton <[EMAIL PROTECTED]> wrote:

--- Scott Nesbitt <[EMAIL PROTECTED]> wrote:
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:
Unless the field is set by the Action before
displaying the JSP the parameter won't hold a value
until it's submitted.

<s:url id="historyUrl" action="LineupHistory"
       includeParams="all">
  <s:param name="foo" value="%{barbar}"/>
</s:url>
If the action that displays this JSP fragment has a
'barbar' property (that is set/initialized)
everthing
is fine. If it doesn't, then you're actually trying
to
build up a URL from form values on the same page,
which generally implies JavaScript.

You may be able to do similar functionality by using
one of the ajax-y S2 tags (haven't thought about
it),
by submitting to a different action (but would keep
the form value of whatever it is you're talking
about), or a few other ways.

d.



____________________________________________________________________________________
Expecting? Get great news right away with email
Auto-Check. Try the Yahoo! Mail Beta.

http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html


---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





____________________________________________________________________________________ TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to