The OGNL creators/authors were definitely 'page' centric e.g.
#attr['foo'] or #attr.foo resolves to 1)Access to PageContext if available, otherwise searches 2)request
3)session
4)application respectively

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

IMHO
Martin

----- Original Message ----- From: "Brad A Cupit" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, June 24, 2008 6:19 PM
Subject: RE: use OGNL to automatically look in the session?


Musachy Barroso wrote:
"#attr" does something similar:

right, but it's kind of yucky in the sense that each of these objects
needs a block like this:

<s:if test="%{myObject == null}">
   <s:set name="myObject" value="%{#session.myObject}" />
</s:if>
<s:else>
   <s:set name="myObject" value="%{myObject}" />
</s:else>

and then I change use of it from:
<s:label value="%{myObject.property}" />

to:
<s:label value="%{#myObject.property}" />

I can live with that, but it seems like a step backward. JSP EL could
automatically look in the session, but now I have to explicitly state
that it's in the session.

Maybe I'm in the minority here...

Brad Cupit
Louisiana State University - UIS


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



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

Reply via email to