wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: <s:iterator
 
Similar Threads
Struts2 Iteator Tag with object in object
Struts iterator tag value attribute
how to use ONGL ?
how to display mysql table datas in jsp using struts2
Struts 2 iterating enums