Well, to expand on Michael's answer a little ;-) You *can* use your DTOs
directly as form beans, but it's generally considered bad practice. One
reason is that you'll want your form beans to use String-typed properties.
That way you can accept invalid data and redisplay it to the user to correct.
A common pattern for dealing with this is to use BeanUtils.copyProperties()
or similar to copy data between your form beans and DTOs. You can reduce
the overhead even further by using DynaForms so you don't actually *have*
any form beans to write, only configuration in struts-config.xml.
L.
Michael Jouravlev wrote:
Instead -- no. But you can use them as nested properties.
On 8/8/05, Mick Knutson <[EMAIL PROTECTED]> wrote:
I have many DTO's and do not want to duplicate code my creating
ActionFOrms that are identical to my DTO's. Can I used the DTO's instead
of ActionForms
?
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]