Actually, it does make sense to have the idea of different contexts for validating domain objects. At Notiva, some people took the validation stuff from Xwork and built a pattern for validating our business objects using the Visitor Pattern to bring the validation down to the sub-object level. We have different validations depending on where we're getting the objects (batch loading from XML from a partner vs. data-entry, etc.) so we used the idea of context (the same as alias) for this. I'm planning on merging this code back into Xwork at some point. I'm still thinking about if we can make it simpler using reflection rather than the visitor object we use now that knows the structure of the business objects, but the basic idea is sound.
Jason > -----Original Message----- > From: Erik Hatcher [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 02, 2003 2:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] WebWork2, here I come! > > > Even me, Mr. eXtreme XDoclet, has reservations about generating the > -validation.xml files if you are serving up your model directly from > your actions. Although, since the validation is completely decoupled > from the web (and this is no difference in Struts), perhaps it does > make sense. > > The main issue I heard Jason mention with it was binding the > knowledge > of action aliases to specific validations. I agree that it doesn't > really make sense to have action aliases in domain objects. > > XDoclet could do as little or as much of this type of thing > that makes > sense. At this point I'm still in learning mode and can comment > further after building a few pieces by hand. > > Erik > > > On Wednesday, July 2, 2003, at 12:43 PM, Ara Abrahamian wrote: > > > Ah yeah I think the -validation.xml stuff is a good candidate for > > auto-geenration. I think xwork.xml is ok without xdoclet, but all > > those validation.xml files are just too much too take care > of by hand. > > I'm ready to help anyone who's interested in implementing > an xdoclet > > module for it. > > > > Ara. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork