struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul <paul.saum...@merge-solutions.com>
Subject RE: [S2] <s:url> w/ params?
Date Tue, 01 May 2007 15:18:49 GMT
Ah!

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

P.

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

--- Paul <paul.saumets@merge-solutions.com> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message