struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaarat Sharma <bhaara...@gmail.com>
Subject Arithmatic operations in Struts2 - ognl
Date Tue, 05 May 2009 18:12:47 GMT
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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message