struts2 - calculate in struts 2 tag? -


i have iterate , want calculate sum of values :

 <s:iterator value="myvalues" status="mystatus">      <s:property value="value" />  </s:iterator>   <s:property value="total.here" />  

i want show sum of "value" in "total.here". sorry bad english. thank much.

assuming myvalues array or list of integral values accessible action:

<s:set var="total" value="%{0}" /> <s:iterator value="myvalues">      <s:set var="total" value="%{top + #attr.total}" /> </s:iterator>  <s:property value="%{'' + #attr.total}" />  

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -