wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts-2 iterator issue...
 
Similar Threads
RadioButton with List Struts 2
iterate an object in struts-2
iterator and <s:radio /> question
s:iterator question
s:iterator problem...