oh nevermind. got it.
Total Age <s:property value="someList.get(0).age + someList.get(1).age"/>

simpler than I thought :)

On Tue, May 5, 2009 at 2:12 PM, Bhaarat Sharma <bhaara...@gmail.com> wrote:

> Is there a way to do this in ognl?
> I have the following code which works fine
>
>     First Name <s:property value="someList.get(0).name"/> Age: <s:property
> value="someList.get(0).age"/>
>     Second Name <s:property value="someList.get(1).name"/> Age: <s:property
> value="someList.get(1).age"/>
>
> However the following line does not work.
>
>     Total Age <s:property value="#{someList.get(0).age +
> someList.get(1).age}"/>
>
> Is it possible to do arithmetic operations in ognl?
>

Reply via email to