Hi Matt, I'm also developing a webapp using AppFuse 1.9.4, and we came across the same issue regarding nested objects and validation rules (See Note - http://raibledesigns.com/wiki/Wiki.jsp?page=ValidationAndList) :
The first solution - remove the @struts.validator tag from struts_form.xdt - works like a charm.. Now I try to get the second solution (see https://appfuse.dev.java.net/issues/show_bug.cgi?id=88) to work. I have added the the BaseObjectWithoutNestedFormValidation class and replaced the ConvertUtil class. The struts_form.xdt (attached to the above issue) however differs significantly from the one in AppFuse 1.9.4. Since I doubt that I can simply replace this file without any version conflicts, and I'm not familiar with Xdoclet Templates, I was wondering if you could give me some pointers what exactly needs to be modified.. I tried to modify it (see attached file), but there are still some struts validation tags that are generated by xdoclet. Thanks Ben Matt Raible-3 wrote: > > To remove the @struts.validator from generated forms, just remove the > following from your struts_form.xdt template: > > <XDtType:ifIsOfType value="return-type" > type="net.cadmus.model.BaseObject"> > * @struts.validator > </XDtType:ifIsOfType> > > Matt > > > On 12/22/06, Fabrizio Cappelletti (Google) > <[EMAIL PROTECTED]> > wrote: >> >> Hi all, >> >> I have problems with validation of nested objects. I'd like to disable >> this function only to validate the main object and not the inner ones. >> >> I have read Issue 88 ( >> https://appfuse.dev.java.net/issues/show_bug.cgi?id=88) and understood >> the >> two solutions: I'd like to apply the second one (the one with >> BaseObjectWithoutNestedFormValidation) but the struts_form.xdt gave me >> some >> errors (when the webdoclet task compiles the web part it can not find >> BaseForm Object for every model class).I think could be a version >> problem. >> >> If it's too difficult to adopt that solution, I could also use the first >> one (move validation from get to set and remove nested) but I have no >> idea >> how to modify the xdt to remove the @struts.validator tag without damage. >> >> I'm using appFuse version 1.9.3. >> >> Thanks >> >> Fabrizio > > -- > http://raibledesigns.com > > http://www.nabble.com/file/p11582307/struts_form.xdt struts_form.xdt -- View this message in context: http://www.nabble.com/nested-objects-with-validation-rules-tf2870817s2369.html#a11582307 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
