Ah!

Doh! Thanks once again Dave. Works now. :)

P.

-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 01, 2007 11:02 AM
To: Struts Users Mailing List;Paul
Subject: Re: [S2] <s:url> w/ params?

--- Paul <[EMAIL PROTECTED]> wrote:
> <input type="button" onclick="location.href='<s:url
> action="editAction"><s:param name="method"
> value="add"/></s:url>'"
> Value="Add"/>
>
> When viewing the page source after rendering should
> it not read:
> location.href='editAction.do?method=add' ?

http://struts.apache.org/2.x/docs/tag-syntax.html

Value is an object, so you'd probably want:

<s:param name="method" value="%{'add'}"/>

That's probably why they have the warning in yellow on
(every?) tag doc page and the link above contains the
following gem:

"""
= value is an Object!

[...] if there is a reason to set the value directly,
be advised that value is an Object NOT a String.

Since value is not a String, whatever is passed to
value is evaluated as an expression - NOT a String
literal.
"""

;)

I *think* what they're trying to say is that it's not
a string, but an object.

(That section always makes me smile; it's a great
reminder for every... single... time... I do the exact
same thing because I forgot.)

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



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

Reply via email to