I think the only way you can have one ActionForm reuse another ActionForm is to include the second ActionForm as a property of the first. For example, if you have a standard AddressActionForm that includes validation rules for street, city, state, postal code, etc. you can use this as a property in your PersonActionForm and your CompanyActionForm.
public AddressActionForm getAddress() { return this.addressForm; } public void setAddress(AddressActionForm newAddress) { this.addressForm = newAddress; } Then, in the validate() method in PersonActionForm and CompanyActionForm, you'll need to call this.addressForm.validate(). -- Jeff On Apr 8, 2005 6:57 AM, Ciaran Hanley <[EMAIL PROTECTED]> wrote: > I am trying to reuse ActionForms within an application but I am unsure how > to deal with validation. What I have at the moment is an ActionForm1 which > contains a second form ActionForm2. In validation.xml, how do I use the > validation for ActionForm2 within the ActionForm1 validation? Can I use it > with something like this - > > <form name="form1"> > > <!-- field validations --> > > <!-- import form 2 validation --> > > <form name="form2"/> > > </form> > > ActionForm2 has its own custom validations which I also need to call when > submitting the form, can I call them by just using > getActionForm2.validate(mapping,request) within ActionForm1 validation > method or how can this be achieved? > > Thanks, > > Ciaran > > -- Jeff Beal Webmedx, Inc. Pittsburgh, PA USA --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]