| Author |
Alternating color of table rows in a forEach tag (JSTL)
|
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
Hi, I got this forEach loop where userslist is a javabean and records a field containing the list of beans. Now when I do this... this makes an alternating color of rows. However, the userId's doesn't always come in order of 123456. So I was thinking of another solution. You guys have any other ideas? Thanks!
|
SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56150
|
|
Shouldn't you be using the loop counter for this? Using the userId is just, well, plain weird. To access the loop counter, investigate the varStatus attribute of forEach.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
That was nice! Thanks!
|
 |
 |
|
|
subject: Alternating color of table rows in a forEach tag (JSTL)
|
|
|