You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ar...@sodebo.fr on 2002/10/21 09:49:39 UTC

Réf. : Re: Réf. : Re: ActionForm andArrayList

Yes, it is very frustrating!
I will be very happy if you could post to me a sample.






                                                                                                               
                    kiuma                                                                                      
                    <kiuma@usa.ne        Pour :  Struts Users Mailing List <st...@jakarta.apache.org>    
                    t>                   cc :                                                                  
                                         Objet :      Re: Réf. : Re: ActionForm and ArrayList                  
                    21/10/2002                                                                                 
                    09:37                                                                                      
                    Veuillez                                                                                   
                    répondre à                                                                                 
                    "Struts Users                                                                              
                    Mailing List"                                                                              
                                                                                                               
                                                                                                               




Since I've recently solved this problem, & I know how much it is
frustrating, and I can't attach files in the mail to this ml,
if u want I can post to you a piece of my code.

Arnaud.PASQUIERS@sodebo.fr wrote:

>Thanks for your help.
>
>But I have the same problem with a String[]... When I retrieve my array,
>after submitting my form, its size is 0.
>Do you know where I can find a real example?
>(My purpose is to update an array of object (not Java objet but custom
>object) via a html:form and ActionForm)
>
>
>
>
>
>

>                    "Dan Tran"

>                    <danttran@hot        Pour :  "Struts Users Mailing
List" <st...@jakarta.apache.org>
>                    mail.com>            cc :

>                                         Objet :      Re: ActionForm and
ArrayList
>                    19/10/2002

>                    02:58

>                    Veuillez

>                    répondre à

>                    "Struts Users

>                    Mailing List"

>

>

>
>
>
>
>In your ActionForm define something like this
>
>     String [] _rows;
>
>    String [] getRow() (return _rows)
>    void       setRow(String [] rows ) { set _rows = rows ;}
>
>
>Then in your  jsp, each elements of your array use property="row", you may
>want to use logic:iterate
>
>It is the idea
>
>-Good luck
>-D
>----- Original Message -----
>From: <Ar...@sodebo.fr>
>To: <st...@jakarta.apache.org>
>Sent: Friday, October 18, 2002 6:34 AM
>Subject: ActionForm and ArrayList
>
>
>>
>>Hello,
>>
>>
>>I have an ActionForm containing an attribute which type is an ArrayList.
>>In my action "EditAction" where I prepare data for the form all is ok. I
>>have the right number of elements in my ArrayList when the form is
>>displayed in my JSP page.
>>
>>But  in my "SaveAction" called when the form is submited, when I try to
>>retrieve the data from my ActionForm I have no element in my ArrayList.
>>However in the other attribute (String type) of the form, I have the
>>
>right
>
>>data.
>>Why??
>>
>>Thanks,
>>Arno
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><ma...@jakarta.apache.org>
>
>>For additional commands, e-mail:
>>
><ma...@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail:   <
>mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <
>mailto:struts-user-help@jakarta.apache.org>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
>
>.
>



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






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>