Hookom, Jacob ([EMAIL PROTECTED]) wrote:

> Your ActionForms should never be passed to your DB layer... ActionForms
> should have strict String attributes and in your Action, take care of
> mapping your Business Beans to your ActionForms and visa versa-- two
> similar, but separate objects.  PropertyUtils works nicely.
> 
> Jacob

I want to branch off here with a question regarding this statement.
If ActionForms should have strict String attributes and the Action
transfers data from the DTO to the ActionForm making use of
Converters where necessary, how are nested objects handled?  Say for
instance there is an Employee object and that employee works for a
Company.  Most of the get/set methods would be strings such as
first/middle/last names and title, but then the employee would need
a nested Company object (struts nested extension comes to mind).
However, would this nested object be a CompanyForm to complement the
EmployeeForm or would it be the Company DTO?  Additionally, how
well does BeanUtils.copyProperties handle nested objects?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"When you're raised by the Jesuits, you become either obedient 
or impertinent" 
 -- Jack McCoy, "Law and Order"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to