On Jan 14, 2004 11:12 AM, Erik Hatcher wrote:
>
> On Jan 14, 2004, at 11:56 AM, Kelly Harward wrote:
> > I have several form beans that inherit common fields from a single 
> > abstract parent form. If some of the fields that are inherited from 
> > the parent need to be validated, how can I get <strutsvalidationxml>

> > to generate the appropriate <field> element in each of the <form> 
> > elements (corresponding to each child form) in my generated 
> > validation.xml?
> 
> I believe this happens automatically.  If not, that is probably a bug.

> If that is not working, send back a short example of parent class, 
> subclass, and generated output.
> 
>       Erik

After further investigation, I've learned that this does happen
automatically. I simply had to add @struts.form tags (with 'name' and
'path' parameters) to all subclasses of the parent class in which I had
defined validation for form fields. Otherwise, I get an XDocletException
telling me that the "Mandatory parameter 'path' missing for struts.form
tag in [class name] class." (Yes, my abstract parent form inherits from
ValidatorActionForm).

I'm converting an existing Struts application to use XDoclet. It would
be nice if I could convert subclasses of my base form bean to use
XDoclet incrementally, rather than in one monolithic change. But in the
end it's probably not that big of a deal.

Thanks for pointing me in the right direction.

-Kelly



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to