Ok. Now we are talking.

Q1: My save action class DOES work like the example. It gets the form and
expects the ActionServlet to fill it up. By the time I get the form, the
ActionServlet is done with it? How would I change this to work properly or
do I need a new version of the util class?

Q2: I was under the impression the html:text tags did not work properly
inside an iterate tag.



                                                                                       
                            
                                                                                       
                            
                                         To:     "'[EMAIL PROTECTED]'"    
                            
                    "Taylor,             <[EMAIL PROTECTED]>              
                            
                    Jeremy"              cc:     (bcc: Will Spies/Towers Perrin)       
                            
                    <jtaylor@lehm        Subject:     RE: POSTing arrays in struts     
                            
                    an.COM>                                                            
                            
                                                                                       
                            
                    04/09/01                                                           
                            
                    10:32 AM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    struts-user                                                        
                            
                                                                                       
                            
                                                                                       
                            



You don't need to generate index properties for the input tags.
Also, how does your save action class work? If you based it on the struts
examples you'll need to
change it because the util class that copies bean properties won't work
with
the array of values for the rows property.

> -----Original Message-----
> From:         Will Spies/Towers Perrin [SMTP:[EMAIL PROTECTED]]
> Sent:         09 April 2001 15:13
> To:           [EMAIL PROTECTED]
> Cc:           '[EMAIL PROTECTED]'
> Subject:           RE: POSTing arrays in struts
>
>
>
> 1. The iterate tag does not generate index properties for the html_text
> *input* tag
> 2. The html:text IS in input tag!
>
>
>
>
>
>
>
>
>
>
>                                          To:
> "'[EMAIL PROTECTED]'"
>                     "Taylor,             <[EMAIL PROTECTED]>
>
>                     Jeremy"              cc:     (bcc: Will Spies/Towers
> Perrin)
>                     <jtaylor@lehm        Subject:     RE: POSTing arrays
> in struts
>                     an.COM>
>
>
>
>                     04/09/01
>
>                     10:08 AM
>
>                     Please
>
>                     respond to
>
>                     struts-user
>
>
>
>
>
>
>
>
> 1. use the iterate tag to iterate through the rows property
> 2. nothing happens on post because you have no input tags
>
> > -----Original Message-----
> > From:         Will Spies/Towers Perrin [SMTP:[EMAIL PROTECTED]]
> > Sent:         09 April 2001 14:35
> > To:           [EMAIL PROTECTED]
> > Subject:           POSTing arrays in struts
> >
> >
> >
> > I've read a couple archived notes on this topic and it's not helping me
> so
> > here goes.
> >
> > I'm trying to post an array of data from my view (JSP) into my bean.
I'm
> > having great difficulty. Here is a JSP snipet of what I'm doing:
> >
> > <html:form action="/saveEmployees">
> > <table>
> >   <tr>
> >     <td align="left">
> >       <html:text property="data.rows[1].EmployeeName" size="30"
> maxlength
> > ="30"/>
> >     </td>
> >   </tr>
> >   <td align="right">
> >    <html:submit>
> >        <bean:message key="button.save"/>
> >    </html:submit>
> >   </td>
> >   <td align="left">
> >     <html:reset>
> >         <bean:message key="button.reset"/>
> >     </html:reset>
> >     &nbsp;
> >     <html:cancel>
> >       <bean:message key="button.cancel"/>
> >     </html:cancel>
> >     </td>
> > </table>
> > </html:form>
> >
> > My form consists of a getData().getRows().EmployeeName. The Rows is the
> > array. I've added the appropriate getRows(int index) and setRows(int
> > index,
> > ...). Still, it doesn't work. Upon the post I do not see my getters
> being
> > called and I get no data in my corresponding form. Help???
> >
> >
> >
> >
> >
>
>
>
>




Reply via email to