On Jan 8, 2004, at 12:29 AM, Vincent wrote:
Hello,
I am new to xdoclet but have been enjoying it for a few weeks while using it on a struts project. I'm finding that @struts.validator is not working for me though. The strutsvalidationxml task does seem to produce
a validation.xml file but it only contains the included contents from
the validation-global.xml merge file that I created.

Does your form bean extend from ValidatorForm (or ValidatorActionForm)?


Here is the code that is supposed to generate an entry:

    /**
     * @struts.validator type="required" msgkey="errors.required"
     */
    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

Yup, that looks right, although msgkey is not needed in this case since the default key for the required validator.


Is there a merge (validation-formset.xml ?) file that I could use
to insert the <form> info into validation.xml until I get the dynamic generation working?



No, unfortunately, there is no merge file that goes into that area of the XML file. But, if the generation isn't working, writing a merge file would only be like writing the real thing so in that case the fall back is to just validation.xml by hand. But, I suspect you either aren't subclassing properly or that you don't have struts.jar or the Validator JAR in the <taskdef> classpath for 'webdoclet'.


Erik



-------------------------------------------------------
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