com.opensymphony.webwork.validators
Class JavaScriptVisitorFieldValidator

java.lang.Object
  extended bycom.opensymphony.xwork.validator.validators.ValidatorSupport
      extended bycom.opensymphony.xwork.validator.validators.FieldValidatorSupport
          extended bycom.opensymphony.xwork.validator.validators.VisitorFieldValidator
              extended bycom.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.


Field Summary
 
Fields inherited from class com.opensymphony.xwork.validator.validators.ValidatorSupport
defaultMessage, log, messageKey
 
Constructor Summary
JavaScriptVisitorFieldValidator()
           
 
Method Summary
 Class getValidatedClass()
           
 void setClassName(String className)
           
 void setValidatedClass(Class validatedClass)
           
 String validationScript(Map parameters)
           
 
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, getValidatorType, setFieldName, setValidatorType
 
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
 

Constructor Detail

JavaScriptVisitorFieldValidator

public JavaScriptVisitorFieldValidator()
Method Detail

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

WebWork Project Page