File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <s:iterator
 
Similar Threads
Struts2 Iteator Tag with object in object
Struts iterator tag value attribute
how to use ONGL ?
Struts 2 iterating enums
how to display mysql table datas in jsp using struts2