You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Akins <an...@gmail.com> on 2010/12/06 18:15:38 UTC
Question about OGNL / EL
This might not be specifically a OGNL question. I've got some code
that doesn't appear to behave correctly.
<title><decorator:title default="Mobile Money Portal" /> - ${partnerId}</title>
<s:url value="%{partnerId}/styles/main.css" var="mainCss" />
When I open this page the title includes the partnerId but the url doesn't
partnerId is set on the Session. I'm wondering if it isn't set when
the <s:url/> tag is evaluated, but is when the EL expression is
evaluated.
Any other idea why this wouldn't be working?
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Question about OGNL / EL
Posted by Greg Akins <an...@gmail.com>.
Dave. The partnerId is being set, in the action class using
session.put("partnerId", "11")
On Mon, Dec 6, 2010 at 1:27 PM, Alfredo Manuel Osorio Martinez
<al...@afirme.com> wrote:
> Try replacing %{partnerId} with %{#session.partnerId}
Thanks! That worked
>
> Alfredo Osorio
>
> -----Mensaje original-----
> De: Greg Akins [mailto:angrygreg@gmail.com]
> Enviado el: Monday, December 06, 2010 11:16 AM
> Para: user@struts.apache.org
> Asunto: Question about OGNL / EL
>
> This might not be specifically a OGNL question. I've got some code
> that doesn't appear to behave correctly.
>
> <title><decorator:title default="Mobile Money Portal" /> -
> ${partnerId}</title>
> <s:url value="%{partnerId}/styles/main.css" var="mainCss" />
>
> When I open this page the title includes the partnerId but the url
> doesn't
>
> partnerId is set on the Session. I'm wondering if it isn't set when
> the <s:url/> tag is evaluated, but is when the EL expression is
> evaluated.
>
> Any other idea why this wouldn't be working?
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Question about OGNL / EL
Posted by Alfredo Manuel Osorio Martinez <al...@afirme.com>.
Try replacing %{partnerId} with %{#session.partnerId}
Alfredo Osorio
-----Mensaje original-----
De: Greg Akins [mailto:angrygreg@gmail.com]
Enviado el: Monday, December 06, 2010 11:16 AM
Para: user@struts.apache.org
Asunto: Question about OGNL / EL
This might not be specifically a OGNL question. I've got some code
that doesn't appear to behave correctly.
<title><decorator:title default="Mobile Money Portal" /> -
${partnerId}</title>
<s:url value="%{partnerId}/styles/main.css" var="mainCss" />
When I open this page the title includes the partnerId but the url
doesn't
partnerId is set on the Session. I'm wondering if it isn't set when
the <s:url/> tag is evaluated, but is when the EL expression is
evaluated.
Any other idea why this wouldn't be working?
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
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
Re: Question about OGNL / EL
Posted by Dave Newton <da...@gmail.com>.
How/where is partnerId defined?
Dave
On Mon, Dec 6, 2010 at 12:49 PM, Maurizio Cucchiara <
maurizio.cucchiara@gmail.com> wrote:
> The url value syntax should be fine. Did you try to test without sitemesh?
>
> 2010/12/6 Greg Akins <an...@gmail.com>:
> > This might not be specifically a OGNL question. I've got some code
> > that doesn't appear to behave correctly.
> >
> > <title><decorator:title default="Mobile Money Portal" /> -
> ${partnerId}</title>
> > <s:url value="%{partnerId}/styles/main.css" var="mainCss" />
> >
> > When I open this page the title includes the partnerId but the url
> doesn't
> >
> > partnerId is set on the Session. I'm wondering if it isn't set when
> > the <s:url/> tag is evaluated, but is when the EL expression is
> > evaluated.
> >
> > Any other idea why this wouldn't be working?
> >
> > --
> > Greg Akins
> >
> > http://insomnia-consulting.org
> > http://www.pghcodingdojo.org
> > http://pittjug.dev.java.net
> > http://twitter.com/akinsgre
> > http://www.linkedin.com/in/akinsgre
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
> --
> Maurizio Cucchiara
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Question about OGNL / EL
Posted by Maurizio Cucchiara <ma...@gmail.com>.
The url value syntax should be fine. Did you try to test without sitemesh?
2010/12/6 Greg Akins <an...@gmail.com>:
> This might not be specifically a OGNL question. I've got some code
> that doesn't appear to behave correctly.
>
> <title><decorator:title default="Mobile Money Portal" /> - ${partnerId}</title>
> <s:url value="%{partnerId}/styles/main.css" var="mainCss" />
>
> When I open this page the title includes the partnerId but the url doesn't
>
> partnerId is set on the Session. I'm wondering if it isn't set when
> the <s:url/> tag is evaluated, but is when the EL expression is
> evaluated.
>
> Any other idea why this wouldn't be working?
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Maurizio Cucchiara
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org