This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How to increment count in S:iterator tag 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 "How to increment count in S:iterator tag" Watch "How to increment count in S:iterator tag" New topic
Author

How to increment count in S:iterator tag

Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
Hello

I have an arraylist<String>. I am using s:iterator tag to display it. But I want to display 2 items at a time.
Is there any way to show 2 items at one iteration. How can I increment current count within iteration and display next item within arraylist.


SCJP 6 (88%), SCWCD 5 (78%), preparing for SCBCD
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Struts2 IteratorTag



ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
Thanks for the reply

But I dont want it this way. I simply want to print next values in same iteration.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to increment count in S:iterator tag
 
Similar Threads
Is it possible to have a selectManyListBox within <ui:repeat> ?
iterator in struts 2 using nested ArrayList
How to display the last item of a select box as default
Struts 2 - Setting and Incrementing integers in jsps
Sticky nested lists problem in Struts 2