struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren James <>
Subject Re: freemaker model population
Date Thu, 28 Feb 2008 19:24:36 GMT
Sorry for the confusing question.  I tried this again and it seemed to 
work fine
(i.e. accessing objects that are not on the top of the value stack via 
ognl expressions
via the ${foo} syntax in freemarker templates)....

However, I did find a couple of places where I had to use the struts 
property tag
instead. For example

<s:set name="foo" value="bar.baz"/>

I could not use ${#foo}, I had to use <s:property value="#foo"/>.

Are there any other gotchas with ${} vs. <s:property value=""/>

thanks peeps,

- darren.

Darren James wrote:
> Hi all,
> I'm fairly new to freemarker, and just started using in in the context 
> of a struts2
> component tag.  I was noticing that it seems like you can do this
>  ${}
> anywhere in the template (vs. using the tag), *but* only when
> the top object on the value stack is the object with property foo.
> my question is, how does struts populate freemarker's model, 
> and is there
> a way to make ${} be evaluated in the context of any object on the
> value stack.
> thanks,
> - darren.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message