I assume 'rearding interator' means the s:iterator tag in a JSP? I doubt
there is any clean/sane way to do this from within the JSP. Instead, do
the summation logic in the action and give the JSP a data structure that
already includes this information.
L.
Milan Milanovic wrote:
Hi,
I have one question regarding iterator. I have one simple list that contain
three values:
List
{ id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that
contain that date, like this:
id__value___date_______sum
----------------------------------------------------------
1__10_____20.5.2008
2__15_____20.5.2008
3__15_____20.5.2008___40
4__12_____21.5.2008
5__15_____21.5.2008___27
6__12_____22.5.2008
....
I'm now have done all iterating except this sum column. Do you have any ideas
how efficent can I do this ?
--
Thx, Milan Milanovic
--- On Thu, 6/5/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
From: Milan Milanovic <[EMAIL PROTECTED]>
Subject: [Struts 2] Iterator usage
To: user@struts.apache.org
Date: Thursday, June 5, 2008, 7:36 AM
Hi,
I have one question regarding iterator. I have one simple list that contain
three values:
List { id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that contain that
date, like this:
id&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp;
date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sum
----------------------------------------------------------
1&nbsp;&nbsp;&nbsp;
10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008
2&nbsp;&nbsp;&nbsp; 15
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008
3&nbsp;&nbsp;&nbsp;
15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008&nbsp;&nbsp;&nbsp; 40
4&nbsp;&nbsp;&nbsp;
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21.5.2008
5&nbsp;&nbsp;&nbsp; 15
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21.5.2008&nbsp;&nbsp;&nbsp; 27
6&nbsp;&nbsp;&nbsp;
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
22.5.2008
....
I'm now have done all iterating except this sum column. Do you have any
ideas how efficent can I do this ?
--
Thx, Milan Milanovic
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]