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 struts-2 iterator issue... 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 "struts-2 iterator issue..." Watch "struts-2 iterator issue..." New topic
Author

struts-2 iterator issue...

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
This is my iterator code... and the image contains the output.




There are 4 records in total...

it's not printing the 1st row but it's starting from 2nd row and in the image, at the end of the table, one can see small empty row..wonder what could be the problem!
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Use #pos.index instead of #pos.count!

Your code would be a lot nicer of you had a single list containing beans with Id, Name, Description, Creator and Date fields...


OCJP 6 (93%)
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
I would certainly change that!

But what's the diff between index and count .I want track how the iterator is doing it ,is it possible?
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Pradeep Adibatla wrote:But what's the diff between index and count


See the documentation for IteratorStatus!
 
 
subject: struts-2 iterator issue...
 
Similar Threads
s:iterator problem...
RadioButton with List Struts 2
iterator and <s:radio /> question
iterate an object in struts-2
s:iterator question