You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Tran <da...@hotmail.com> on 2003/06/03 09:58:39 UTC

ArrayList as an element of DynaActionForm

Hello, I define an ArrayList as an element of my DynaActionForm.

I set up my form and load it up on my jsp using <c:foreach>

But when I submit the form back to the server, my ArrayList always empty.

What did I do wrong?

Thanks

-Dan

Re: ArrayList as an element of DynaActionForm

Posted by Dan Tran <da...@hotmail.com>.
Mark, my ArrayList is a list of another value object beans which has few
string properties.

In my JSP I use <c:foreach> and display all fields in the array, of course I
make them editable.

When I submit the button, I would think struts is smart enought to move the
form in HttpServletRequest back to the DynaActionForm.  am I wrong?

-Dan
----- Original Message ----- 
From: "Mark Lowe" <ma...@talk21.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, June 03, 2003 2:32 AM
Subject: Re: ArrayList as an element of DynaActionForm


>
> How/where do you populate your ArrayList?
>
> On Tuesday, Jun 3, 2003, at 08:58 Europe/London, Dan Tran wrote:
>
> > Hello, I define an ArrayList as an element of my DynaActionForm.
> >
> > I set up my form and load it up on my jsp using <c:foreach>
> >
> > But when I submit the form back to the server, my ArrayList always
> > empty.
> >
> > What did I do wrong?
> >
> > Thanks
> >
> > -Dan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


Re: ArrayList as an element of DynaActionForm

Posted by Mark Lowe <ma...@talk21.com>.
How/where do you populate your ArrayList?

On Tuesday, Jun 3, 2003, at 08:58 Europe/London, Dan Tran wrote:

> Hello, I define an ArrayList as an element of my DynaActionForm.
>
> I set up my form and load it up on my jsp using <c:foreach>
>
> But when I submit the form back to the server, my ArrayList always 
> empty.
>
> What did I do wrong?
>
> Thanks
>
> -Dan


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