You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kenneth Aastrøm <ke...@cellnetwork.no> on 2002/02/12 15:34:48 UTC

Forms and Collections

Hi,

I have an ActionForm with the usual ints and Strings, and a Collection containing my own beans. After a lot of fiddling (and the latest nightly), I've now managed to display the contents of the Collection in my form as textfields, using:
<nested:iterate property="collectionname">
<nested:write property="bean-title"/><nested:text property="bean-value"/>
</nested:iterate>

After submitting the form, I can easily get the single-value fields from the form ... but the collection is now empty. 
How do I go about making the form update the collection after a submit (without parsing the request-object myself) ?

Kenneth Aa.
 

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


Re: Forms and Collections

Posted by Arron Bates <ar...@pacific.net.au>.
Could it be that the reset method in the form is killing the collection?...
If it's displaying properly, then by all rights it should be updating 
properly back on the server.

Arron.

Kenneth Aastrøm wrote:

>Hi,
>
>I have an ActionForm with the usual ints and Strings, and a Collection containing my own beans. After a lot of fiddling (and the latest nightly), I've now managed to display the contents of the Collection in my form as textfields, using:
><nested:iterate property="collectionname">
><nested:write property="bean-title"/><nested:text property="bean-value"/>
></nested:iterate>
>
>After submitting the form, I can easily get the single-value fields from the form ... but the collection is now empty. 
>How do I go about making the form update the collection after a submit (without parsing the request-object myself) ?
>
>Kenneth Aa.
> 
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>



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