Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Adding Value in ArrayLisy WITHOUT SCRIPTING

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I wannn to know if there is any way by means of which I can add the values in the Arraylist without scripting. I want to use ONLY the struts standard tag libraries and not the JSTL tags
Thanks in advance
Samir
 
author
Posts: 9000
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Samir,

I moved this over to the Struts forum.

Bert
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I understand what you mean by "adding values", but I'm assuming that you mean calculating the sum of some numeric values.

The best way to do this without any type of scripting or using JSTL would be to create a method in your ActionForm that does it. Example:

Then in your JSP:

<bean:write name="MyForm" property="sumOfMyList" />

[ August 16, 2006: Message edited by: Merrill Higginson ]
[ August 16, 2006: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic