GeeCON Prague 2014*
The moose likes Struts and the fly likes <s:iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<s:iterator " Watch "<s:iterator " New topic
Author

<s:iterator

Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53
Hi,

How do i reverse iterate using OGNL. Say i have the following



Now i want to traverse from 5,4,3,2,1 etc.
It's something like doing the below:



Any idea how to do this?
Aneesh Vijendran
Ranch Hand

Joined: Jun 29, 2008
Posts: 125
Why don't you do:



Cheers
Aneesh
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There are a number of ways to do this depending on how clever you want to get. Check out the existing collection tags for info. Could also do something tricky via OGNL--check out the OGNL docs. Or just reverse it on the Java side.
 
GeeCON Prague 2014
 
subject: <s:iterator