struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: Question regarding OGNL
Date Sat, 15 Mar 2008 02:47:06 GMT
dave is is correct..

#foo.blah // returns foo.getBlah()
#bar.blah // returns bar.getBlah()
blah      // returns foo.getBlah() because foo is the root

http://struts.apache.org/2.x/docs/ognl-basics.html

Martin-
----- Original Message -----
From: "Dave Newton" <newton.dave@yahoo.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Friday, March 14, 2008 2:19 PM
Subject: Re: Question regarding OGNL


> --- Laurie Harper <laurie@holoweb.net> wrote:
> > AFAIK, %{#name} is equivalent to %{name} when there is a getName() on
> > the action, i.e. OGNL will look at the action first then search the rest
> > of the value stack.
>
> Mmm, I'm not sure about that. The "#" should look explicitly for a named
> object in the stack context rather than calling getXxx() on stack objects.
>
> For example, if I have:
>
>       <p>Prop from Sanity action: <s:property value="sanityCheck"/></p>
>       <p>Prop from Sanity action: <s:property value="#sanityCheck"/></p>
>
> only the first one will print the action's getSanityCheck() value.
>
> Not that I just happened to have that example laying around or anything
geeky
> like that.
>
> *ahem*
>
> Chup Chups!
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message