Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts-2 iterator issue...

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep Adibatla wrote:But what's the diff between index and count


See the documentation for IteratorStatus!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic