Is that actually rendering properly?!

I thought you had to add an index to the field name manually so it would be 
sent back as foo.bar[1], but perhaps I'm wrong.

Dave

--- On Wed, 6/25/08, Kleiderman, Matthew <[EMAIL PROTECTED]> wrote:

> From: Kleiderman, Matthew <[EMAIL PROTECTED]>
> Subject: Multi-row tabular forms
> To: user@struts.apache.org
> Date: Wednesday, June 25, 2008, 6:46 PM
> I'm trying create a form that maps to a collection of
> data objects, so
> that a user can edit any property of any object, and submit
> the changes.
> I'm using an s:iterator tag to draw each item in the
> collection as a row
> in a table, and the xhtml template.  The table is getting
> drawn
> properly, with data filled in from the collection -  but
> the Action
> receiving the data always has the Collection set to null. 
> Here's a
> stripped-down excerpt of what the .jsp looks like:
> 
> <s:form theme="xhtml"
> id="configureobjects"
> action="DoConfigureObjects">
>   <s:label theme="xhtml"
> label="Name" name="Name" />
>   <s:hidden name="Name" />
>   <table>
>     <tbody>
>       <s:iterator value="DataObjects"
> var="CurrentObject">
>       <tr>
>         <td>
>           <s:property
> value="CurrentObject.Property1" />     
>           <s:hidden
> name="CurrentObject.Property1"
> value="CurrentObject.Property1" />
>         </td>
>         <td>
>           <s:textfield
> name="CurrentObject.Property2" />
>         </td>
>         <td>
>           <s:textfield
> name="CurrentObject.Property3" />
>         </td>
>       </tr>
>       </s:iterator>
>     </tbody>
>   </table>
>   <sx:submit label="Configure" />  
> </s:form>
> 
> What am I doing wrong?
> 
> Thanks in advance,
> 
> Matt Kleiderman
> 
> ---------------------------------------------------------------------
> 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