Re: form bean with ArrayList

2002-04-25 Thread Nicolas De Loof
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()? This grows automatically part is something that I think is not completely right. If you

RE: form bean with ArrayList

2002-04-25 Thread Greg Nyberg
Mailing List Subject: Re: form bean with ArrayList 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()? This grows automatically part

form bean with ArrayList

2002-04-24 Thread Greg Nyberg
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

RE: form bean with ArrayList

2002-04-24 Thread Galbreath, Mark
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:[EMAIL PROTECTED]] Sent: Wednesday, April

RE: form bean with ArrayList

2002-04-24 Thread Galbreath, Mark
Well, yeah, you can't set() an element in a space that does not exist. If Greg is adding elements, it will grow automatically (and because it's reset after each action, I think trimToSize() is unnecessary overhead), and if he is adding a collection at one time, he can use the ArrayList(