Why won't validation occur on the whole object? You could use an exception strategy that collects exceptions rather than terminating on the first one, for instance. This is useful anyway if you have any batch processing accessing your domain model as well.
There's a philosophy decision here, whether to use a rich domain model, or use a traditional service/value object model. My feeling is that it works with both, but the original WebObject designers had a rich domain model in mind. J -----Original Message----- From: Kent Tong [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 5:36 AM To: [email protected] Subject: Re: Tapestry Design Best Practices question Dirk Dittert <tapestry4dirk <at> gmx.de> writes: > 2. Use a "fake" user object for Tapestry to set the values and copy > values to the real user object in case of an edit? This approach is > only a little more elegant (saves the hashmap + I don't need to copy > values in case of an "add"). I think this is a better solution than using a listener of a Hidden component to fetch the object. As you prefer the latter, I suppose that you're using a O/R mapping tool that allows you to modify a persistent object in place. However, this will not allow you to perform validation on the whole object before deciding to save it. -- Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT) --------------------------------------------------------------------- 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]
