struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <>
Subject Re: Validating Nested DynaValidator Forms
Date Mon, 21 Mar 2005 15:19:41 GMT
jelything wrote the following on 3/18/2005 4:58 PM:
> Thanks for the feedback.
> Why wouldn't I want to nest forms? 

Because how are you going to populate them and create them all? For 
example, imagine the case where you needed to a master detail edit of 
company employees (granted this might not be a practical example, but 
using this to explain the point)).

The hierachy might look like...
    Company Object
       Store objects
          Division Objects
              Emloyee Objects

So before doing your mass edit for display, your backend might be giving 
you a "Company" object which iniside has Stores and inside stores is a 
collection of Divisions (accounting, sales) and then in each division is 
a list of Employee objects.

For this example we then want to edit the employees. So in your scenario 
you'll have to create form beans for Company, Store, divions, employe 
and then somehow get them all created and nested within each other. Why 
do this when you can just have one form bean with "Company" as the 
property? Then you just nest iterate over the company, stores, 
devisions, employees, and you can thus edit the employees and hit submit 
and presto your Company business object is all nice and populated.

Explain to me how you would do the above while nesting form beans?


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

View raw message