Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Re: adding values to a variable inside iterator tag

Jim Kiley

2009-06-29

Replies: Find Java Web Hosting

Author LoginPost Reply
You're far better off doing it inside the Action class.
That said, you can probably use s:set to get what you want.

jk

On Mon, Jun 29, 2009 at 12:03 PM, Bhaarat Sharma <bhaarat.s@(protected):

> Hi,
> I have a simple iterator tag like the following
>
> <s:iterator value="results">
>
>   <s:property value="value1"/>
>
> </s:iterator>
>
> is there a way to get the total of value1 at the end of this iterator tag?
>
> basically in java we would do totalValue += value1; and then at the end of
> the loop we would have total of value1.
>
> Is that possible to do with an iterator tag?
>



--
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com
©2008 gg3721.com - Jax Systems, LLC, U.S.A.