Hubert,

i had previously read the indexprops article in the faq.  i think i
have that part working.  the second article was helpful, but i'm still
a bit confused.
when submitting my form.  does my actionform need to have an array of
beans in it for the textfields?  or can i just use an array of
strings?
if it needs an array of beans it seems silly to create a bean that has
a getter and setter for one string...  although, i haven't been able
to get it to work either way.
i guess the question i have is how do i create an actionform that
contains lists of data?  i'd prefer not to use DynaActionForms as the
article suggests because they got me into trouble once before. :)

i'd look through the mailing list archives if they were searchable. 
but as i noted in my previous post i keep getting the message 'Text
search not available for this list'.

andy

On Fri, 30 Jul 2004 11:32:25 -0700 (PDT), Hubert Rabago
<[EMAIL PROTECTED]> wrote:
> The problem is that Struts tries to populate your form, it starts with an
> empty collection.  Take a look at LazyList (search the mailing list
> archives), or pre-initialize your form and put it in session scope.
> 
> For more info, read http://struts.apache.org/faqs/indexedprops.html and
> http://www.developer.com/java/other/article.php/2233591.
> 
> --- Andrew Close <[EMAIL PROTECTED]> wrote:
> 
> > hi all,
> >
> > i'm having a hard time getting data from multiple textfields with
> > similar names out of a form and into my actionform.
> > in my JSP i'm using a [logic:iterate] tag to display (up to) ten
> > textfields.  these textfields are initially empty.  the user enters
> > data into the text fields and hits 'add', and i get an
> > IndexOutOfBoundsException.  this exception isn't occuring in my code,
> > but i'm sure it's due to something i'm doing (or not doing) in my
> > code.
> > my action form has a Collection variable named itms that is an
> > ArrayList.  the getter returns a Collection and the setter takes an
> > array of Strings, iterates through them and puts them into the
> > ArrayList.  although i never get to that point.
> > i'm sure that my actionform is to blame and whatever Struts does
> > behind the scenes to populate my actionform is blowing up.
> >
> > i've looked at a couple of Ted Husteds articles (most notably: Use an
> > array to capture multiple parameters) but they don't seem to deal with
> > getting data out of the page form and into the action form.  i've also
> > tried to search the mailing list archives but i keep getting the
> > message 'Text search not available for this list'...
> >
> > any pointers or suggestions on correctly setting up an actionform to
> > retrieve data from textfields that were built with an iterator?
> >
> > thanks
> > andy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
>                 
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to