Your assumptions are correct - if you modify struts_form.xdt to remove the following lines, child form's validation rules won't be included by default.
<XDtType:ifIsOfType value="return-type" type="org.appfuse.model.BaseObject"> * @struts.validator </XDtType:ifIsOfType> If you do have a form that you'd like to bring in validation rules for, simply add @struts.validator to the javadocs of the getter in your POJO. HTH, Matt On 2/21/07, Sanders, Corey <[EMAIL PROTECTED]> wrote:
I am having some trouble with appfuse and the struts validator framework. I have an object A with a foreign key to another object B. When appfuse generates the StrutsForm object for A, it notices object B, changes the object reference to BForm, and includes that property in the generated class. I'm not 100% sure why that is, but I figure there is a good reason. Anyway, the problem I am having is that when I try to submit to an action where validation is enabled for AForm, the validator seems to be picking up all the validation rules from BForm in addition to the rules in AForm. I don't need the BForm validation rules to fire in AForm. BForm validation rules are only used on the BForm management pages. Is there a way to prevent the validation framework from traversing the graph and picking up all the validation rules for linked forms? I figure I could stop this behavior by changing struts_form.xdt not to include peer objects as forms, but I don't want to undo that behavior without understanding why it is happening in the first place. So an explanation of what that is accomplishing would also be helpful. Thanks, Appfuse v1.9.4/Struts/Hibernate --- Corey Sanders Senior Software Developer Sterling Commerce, an AT&T Company Phone: (614) 659-6860 Fax: (614) 793-7045
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
