struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian K. Buckley" <bbuck...@surfglobal.net>
Subject extending StrutsValidator
Date Fri, 30 Nov 2001 13:34:27 GMT
Hello,

I've attempted to write my own Validator class by extending StrutsValidator.
My class adds my own static validate method.  It doesn't work.  Instead,
when I use it I get a message appearing in the Tomcat console
"Validator::validate() reflection - MyValidator".

What's wrong?  Is this a proper use of the Validator framework?

Shown below is my class and also my corresponding validator entry in my
validate.xml file.

-Brian

public class MyValidator extends StrutsValidator {

    public static boolean validateWidget(Object bean,
        ValidatorAction va, Field field,
        ActionErrors errors,
                             HttpServletRequest request, ServletContext
application) {
  ...

}

<validator name="widget"
                 classname="MyValidator"
                 method="validateWidget"
                 depends="required"
                 msg="errors.widget"
</validator>




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message