hi!
its funny how this thing comes up every two weeks on the list =)
i got to admit that at first the solution of having value objects/dtos in an actionform sounded great and making things easy in the action.. no more endless accessor calling..
but after thinking about it for a while and some playing around with the different possible solutions i figured two things:
1) i misunderstood/misused what actionforms are. it seems like some kind of hack to expose the vos so far out to the client layer.
2) things get ugly when you want to redisplay invalid input 'foo22' for an int property for example..
ciao! florian
On Mittwoch, Juni 18, 2003, at 05:07 Uhr, Weissman, Alan wrote:
Ok so I'm a little new to Struts but not J2EE and I've been noticing that my
Value Objects that come out of EJB's in my data layer are the exact same
objects as the ActionForms that are used by Struts....and I'm sure I'm not
the first to notice this.
So here's my question: How can I make one class that can serve as both an
ActionForm and a ValueObject?
The problems with solutions that I've brainstormed are this:
1) I can't make my Value Objects extend ActionForm for obvious reasons.
2) I would rather not use an interface to get around this issue because then
I have two classes to maintain again.
Thanks for any advice!
Alan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]