struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <Galbre...@tessco.com>
Subject RE: form bean with ArrayList
Date Wed, 24 Apr 2002 16:17:45 GMT
That's pretty weird, considering an ArrayList has an initial capacity of 10
and grows automatically.  Are you sure you are re-instantiating the List
after (I assume) dereferencing it in reset()?

Mark

-----Original Message-----
From: Greg Nyberg [mailto:greg.nyberg@objectpartners.com]
Sent: Wednesday, April 24, 2002 11:44 AM

I have a form bean with an attribute implemented as an ArrayList (a recent
feature).

Form page works fine when I fill the ArrayList with strings to display in an
indexed <html:text> field.. No problem.

But submitting/processing the form has some trouble. I notice that unless I
pre-allocate the ArrayList in the reset() method to the length required to
accept all of the input fields, the "PropertyUtils" fails when it tries to
post the form data in the array:

<Apr 24, 2002 10:20:24 AM CDT> <Error> <HTTP> <101017>
<[WebAppServletContext(56
83213,admin,/admin)] Root cause of ServletException
java.lang.IndexOutOfBoundsException: Index: 28, Size: 0

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


Mime
View raw message