struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Allen <...@mojavelinux.com>
Subject nested objects in ActionForm [was: Where to do TextConversion?]
Date Mon, 23 Jun 2003 18:25:32 GMT
Hookom, Jacob (Jacob.Hookom@redline.mckhboc.com) 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, <dan@mojavelinux.com>
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message