File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53

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:

David Newton

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.
I agree. Here's the link:
subject: <s:iterator
It's not a secret anymore!