| Author |
logic iterate doesnt show me correct data
|
JoseDeJesus Arena
Greenhorn
Joined: Apr 24, 2011
Posts: 4
|
|
Hi, everybody, I need your help, because I need to Iterate a List with strut´s logic:iterate tag, but I only getting the information of the last record of the query that I excecute before, for example the result of my sql query it´s something like this
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
5 5 5 5
When I excecute my code, the JSP only repetme five times the last record
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
here is a snippet of my code from my action class
Here I call a method named generarReportes, an here a snippet form my implementation
And finally in my JSP
So could you please help me to figured out whats wrong with my code??
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8259
|
|
Welcome to the JavaRanch.
Please UseCodeTags when you post code. It preserves the formatting and makes it easier to read.
As for your problem, you should ask yourself how many instances of serviciosVO should be in listaAgendados.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
JoseDeJesus Arena
Greenhorn
Joined: Apr 24, 2011
Posts: 4
|
|
Thanks for the advice Joe, and yes you are complete right because inside the while I just had a instance of my object, so every time execute that line just overwrite my instance, so what I did it was inside the while create a new instance of my object and it works fine
|
 |
 |
|
|
subject: logic iterate doesnt show me correct data
|
|
|