Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

<s:iterator  RSS feed

 
Rohit Rai
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you do:

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!