• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

add collection values

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am getting values of total in six rows for example
in first row 2,in second row 2 like that from a map in action class(strut web application)

<logic:iterate id="ele" name="daMap">
<logic resent name="ele" property="value">
<bean efine id="ia" name="ele" property="value"/>
<bean:write name="ia" property="numeric"/>
</logic resent>
</logic:iterate>

now issue is i need to add these value and show that result on same page after these rows

whether it is possible or not.if yes how


Regards
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd suggest creating a method such as getTotal() in your ActionForm bean that reads the HashMap and calculates the total.

You can then display it like this:

<bean:write name="myActionForm" property="total" />
 
reply
    Bookmark Topic Watch Topic
  • New Topic