struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathew, Manoj" <Mathew.Ma...@principal.com>
Subject RE: ArrayList and DynaActionForm
Date Tue, 27 Apr 2004 16:28:29 GMT


Narayan

you got the answer for this? Can you please share that with me?
I searched the Archive, but couldn't find Richard's earlier solution.
I am using 
<form-bean name="creditCostsForm" type="...">
        <form-property name="creditCosts" type="java.util.ArrayList" />

but gettingArrayIndexoutofBond while setting...

matt


-----Original Message-----
From: Richard Yee [mailto:ryee86@yahoo.com]
Sent: Monday, April 26, 2004 4:45 PM
To: Struts Users Mailing List
Subject: Re: ArrayList and DynaActionForm


If you have a fixed # of elements or if you put the
count of elements in your form bean, you can put code
in your reset() method to initialize the List
attribute with the proper # of elements. This will
enable you to use request scope and not use the
LazyList. If you check the archives, I answered
another question about a week ago on this and provided
step-by-step instructions.

Regards,

Richard


--- narayanan a <sna_narayanan@yahoo.com> wrote:
> All,
> 
> I have an ArrayList in a DynaActionForm. I am
> populating the ArrayList in my Action class and
> displaying the list as text boxes in the JSP page.
> When the user clicks on the submit button, Struts is
> not able to put back the values into the ArrayList
> and
> it throws IndexOutOfBoundsException. The form bean
> is
> in request scope. This problem can be solved by
> putting the form bean in session scope, but I do not
> want to do that. 
> 
> Any help would be appreciated.
> 
> Thanks
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> http://photos.yahoo.com/ph/print_splash
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message