A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JSTL forEach syntax
Joined: Apr 06, 2008
Apr 09, 2008 22:16:00
In the forEach syntax what does varstatus means
Joined: Dec 06, 2004
Apr 09, 2008 22:44:00
"varstatus" attribute in forEach will give you an index of the element in iterating List.
For first iteration its value will be 1
For second iteration its value will be 2..
Balasubramani SD,<br />SCJP 1.4,SCWCD 1.4,SCJP 5.0<br /><a href="http://sd.balasubramani.googlepages.com" target="_blank" rel="nofollow">www.sd.balasubramani.googlepages.com</a>
Joined: Nov 24, 2005
Apr 09, 2008 22:47:00
It's a bit more than that. varStatus gives you access to a scoped variable whose type is
If you look at this class
, you'll see that it allows you to get more information about the loop.
All roads lead to JavaRanch
Joined: Feb 22, 2005
Apr 09, 2008 23:30:00
I'd also recommend this
for clearing up any doubts you might have about the for-each tag. All attributes of this tag are quite clearly explained.
subject: JSTL forEach syntax
EL with List of Objects
Getting a typed Iterator for Generics
logic:iterate for counter
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014