struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: why doesnt iterator tag provide 'next'
Date Sun, 31 May 2009 14:08:17 GMT
Jim Kiley wrote:
> Assuming that you're iterating over a List, why not instead iterate over a
> List of Integers, and use those Integers as the index to your iterator?  You
> can increment the counter inside the iterator.  Or if you need to get foo[0]
> and foo[1] on the first run through, foo[2] and foo[3] on the next run, you
> could iterate over a List {0, 2, 4, 6, 8...} and get dataList[i] and
> dataList [i + 1].  It's easy enough to dynamically generate the List of
> Integers in your action class.

Yep--that was the "just use the index" bit, but I'm grumpy today and 
didn't feel like spelling it out :)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message