com.opensymphony.webwork.validators
Class JavaScriptVisitorFieldValidator
java.lang.Object
com.opensymphony.xwork.validator.validators.ValidatorSupport
com.opensymphony.xwork.validator.validators.FieldValidatorSupport
com.opensymphony.xwork.validator.validators.VisitorFieldValidator
com.opensymphony.webwork.validators.JavaScriptVisitorFieldValidator
- All Implemented Interfaces:
- com.opensymphony.xwork.validator.FieldValidator, ScriptValidationAware, com.opensymphony.xwork.validator.ShortCircuitableValidator, com.opensymphony.xwork.validator.Validator
- public final class JavaScriptVisitorFieldValidator
- extends com.opensymphony.xwork.validator.validators.VisitorFieldValidator
- implements ScriptValidationAware
This validator adds client-side validation to make sure a required field has been filled in.
Implementation note: this class is marked final because WebWork handles visitor field
validation as a special case to cache validator lookups.
Fields inherited from class com.opensymphony.xwork.validator.validators.ValidatorSupport |
defaultMessage, log, messageKey |
Methods inherited from class com.opensymphony.xwork.validator.validators.VisitorFieldValidator |
getContext, isAppendPrefix, setAppendPrefix, setContext, validate |
Methods inherited from class com.opensymphony.xwork.validator.validators.FieldValidatorSupport |
getFieldName, setFieldName |
Methods inherited from class com.opensymphony.xwork.validator.validators.ValidatorSupport |
addActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getValidatorContext, isShortCircuit, setDefaultMessage, setMessageKey, setShortCircuit, setValidatorContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.opensymphony.xwork.validator.Validator |
getDefaultMessage, getMessage, getMessageKey, getValidatorContext, setDefaultMessage, setMessageKey, setValidatorContext |
JavaScriptVisitorFieldValidator
public JavaScriptVisitorFieldValidator()
setClassName
public void setClassName(String className)
setValidatedClass
public void setValidatedClass(Class validatedClass)
getValidatedClass
public Class getValidatedClass()
validationScript
public String validationScript(Map parameters)
- Specified by:
validationScript
in interface ScriptValidationAware