struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yujin Kim" <>
Subject RE: Indexed property
Date Tue, 07 Jan 2003 18:53:53 GMT

Thank you very much.  You made my day.
Thanks Alok for your sample codes as well.

Overriding the reset method, and modifying the getter method did the
trick for me.


-----Original Message-----
From: [] 
Sent: Tuesday, January 07, 2003 1:24 PM
Subject: RE: Indexed property

Override reset method in your ActionForm

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Yujin Kim [] 
Sent: January 7, 2003 1:21 PM
To: 'Struts Users Mailing List'
Subject: Indexed property


I understand this topic has been discussed before, so I apologize for
posting this again.
Using strtus 1.1-b3, I'm creating a form bean that contains a
collection(ArrayList) and use it to populate the jsp using the iterate
tag.  With or without indexed attribute in the form elements (i.e
<html:text .... Indexed="true")>, I got the jsp to populate the data.
My problem is mostly in the action class where the form gets submitted.

If I don't set indexed="true", then the jsp is populated correctly. But
when the submit button is clicked, the the collection is always set to

If I set indexed="true", and if I put indexed getter and setter methods
along with regular getter and setter for the collection, I would get "No
getter method for property" error when jsp is created.

If I set indexed="true", and if I don't have indexed getter and setter,
then jsp is created fine with correct indexed form field name, etc but I
would get "java.lang.IndexOutOfBoundsException: Index: 0, Size: 0" error
on submit.

I've been struggling with this issue since yesterday, and I'm running
out of ideas now.

Any comments would be greatly appreciated.  
(And hopefully I described my problem for you to understand.)


P.S: my apologies for not posting the sourcecode.  I don't want to post
it as is, and I'm a bit tight on time to meet the deadline, so I didn't
want to spend too much time on reformatting the source code I have.  I
would send it out if any of you think it's necessary.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message