PQ,

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.

Yujin

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


Override reset method in your ActionForm

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

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

Hello,

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
null.

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.)

Yujin

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:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to