struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hunter Hillegas <>
Subject Design Question: ActionForms with Nested ActionForms
Date Tue, 22 Apr 2003 15:45:12 GMT
Is it okay for an ActionForm to contain a collection of ActionForms as one
of its properties?

We have an application with the following flow:

1. Display page that allows user to specify the number of "items" in their
"request". This submits to a JSP page that displays a form.
2. This form contains some "header" information and then loops to create the
"items", the number of which is determined by the previous user input.
3. This form will submit to an Action that validates all of the data in the
header and the "items" and then commits some data to a database...

We're converting this application to Struts and I'm wondering if it is okay
to set it up as follows:

1. ActionForm for the "header" part. This ActionForm contains a collection
of "items".
2. Collection of "items" is a collection of ActionForms that model that part
of the form.

Will Struts be able to validate the ActionForm objects that are in the

How do I name the items in the HTML form (see Step 2 above) so that the
ActionForms that go in the collection auto-populate? Do I need to append
some kind of number?

Is there an example application that uses a similar flow?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message