| Author |
logic iterate something wrong
|
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
in my action: I have an arrayList(called names) of objects. and i set this arraylist in my form. in my jsp i do this:
|
 |
Vicky Mohan
Ranch Hand
Joined: Oct 14, 2004
Posts: 130
|
|
Can you attach the exact error message that gets printed in the console so that it would get a better idea of what is going wrong here ?? [ August 25, 2005: Message edited by: Mohen Vijay ]
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
|
|
 |
Vicky Mohan
Ranch Hand
Joined: Oct 14, 2004
Posts: 130
|
|
DO you have an attribute name in your object ?? Try giving the TYPE attribute in logic:iterate, that may help to cast it to the right object..
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
yes. and did'nt work
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
I think that when you are submitting the page, the arrayList is no longer full of name objects (I'm assuming you are using request scope). So Struts says, "Give me name #x from the arrayList so I can call setName() on it. What? There's no object? Exception!" Here's a few methods for getting around this problem.
|
A good workman is known by his tools.
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
that was it!!! a little more info in the error would have been great.. but hey alls well that ends working... thanks Marc
|
 |
 |
|
|
subject: logic iterate something wrong
|
|
|