You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leandro Melo <lt...@yahoo.com.br> on 2004/09/06 23:28:07 UTC
1:N relationship - ActionForms x DTOs
hi,
unfortunatelly i got my action forms coupled with my
DTOs . This is a very common disucussion in which i
don't want to go to the merits of it right now.
I just need a solution for a specific problem, but if
this solutions requires going back to the first point,
it's ok.
I'm used to have jsps that are "coupled" with my dtos,
so for a page in which the user regiter data about the
company, there's a CompanyDTO object that will
transfer the data from the Action to the persistent
layer.
Also i have an analogue ProjectDTO which transfer data
from Action to persisten layer.
The page used to register a company has a form bean
with fields that matches the CompanyDTO data type.
The page used to register project data has a form bean
with fields that matches the ProjectDTO.
Now, i have a new page for user to input data about
the company and it's projects. A better approach would
be building a "new" form bean and a new ActionForm
with both the company fields and the project fields.
Naturally this "new" form bean and ActionForm would
like just the same as the CompanyActionForm +
ProjectActionForm, so i thought if there's a way i can
reuse my ProjectActionForm and my CompanyActionForm to
build a CompanyProjectActionForm without having to go
with all the fields one by one for this action Form.
Is there a way to do that???
So i would have an CompanyProjectActionForm "composed"
by two other ActionForms, instead of having to write a
whole new CompanyProjectActionForm.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org