Package org.apache.struts2.components
Class Form.FieldVisitorValidatorWrapper
java.lang.Object
org.apache.struts2.components.Form.FieldVisitorValidatorWrapper
- All Implemented Interfaces:
- FieldValidator,- Validator
- Enclosing class:
- Form
Wrap field validator, add visitor's field prefix to the field name.
 Javascript side is not aware of the visitor validators
 and does not know how to prefix the fields.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the default message used for validation failuresGets the field name to be validatedgetMessage(Object object) Gets the validation failure message for the given objectGets the resource bundle key used for lookup of validation failure messageString[]Gets the message parameters to be used when parsing i18n messagesGets the validation context usedGets the validator type used (see class javadoc).voidsetDefaultMessage(String message) Sets the default message to use for validation failurevoidsetFieldName(String fieldName) Sets the field name to validate with this FieldValidatorvoidsetFieldValidator(FieldValidator fieldValidator) voidsetMessageKey(String key) Sets a resource bundle key to be used for lookup of validation failure messagevoidsetMessageParameters(String[] messageParameters) Sets the message parameters to be used when parsing i18n messagesvoidsetNamePrefix(String namePrefix) voidsetValidatorContext(ValidatorContext validatorContext) This method will be called before validate with a non-null ValidatorContext.voidsetValidatorType(String type) Sets the validator type to use (see class javadoc).voidsetValueStack(ValueStack stack) Sets the value stack to use to resolve values and parametersvoidThe validation implementation must guarantee that setValidatorContext will be called with a non-null ValidatorContext before validate is called.
- 
Constructor Details- 
FieldVisitorValidatorWrapper
 
- 
- 
Method Details- 
getValidatorTypeDescription copied from interface:ValidatorGets the validator type used (see class javadoc).- Specified by:
- getValidatorTypein interface- Validator
- Returns:
- the type used
 
- 
getFieldNameDescription copied from interface:FieldValidatorGets the field name to be validated- Specified by:
- getFieldNamein interface- FieldValidator
- Returns:
- the field name
 
- 
getFieldValidator
- 
setFieldValidator
- 
getDefaultMessageDescription copied from interface:ValidatorGets the default message used for validation failures- Specified by:
- getDefaultMessagein interface- Validator
- Returns:
- the default message
 
- 
getMessageDescription copied from interface:ValidatorGets the validation failure message for the given object- Specified by:
- getMessagein interface- Validator
- Parameters:
- object- object being validated (eg. a domain model object)
- Returns:
- the validation failure message
 
- 
getMessageKeyDescription copied from interface:ValidatorGets the resource bundle key used for lookup of validation failure message- Specified by:
- getMessageKeyin interface- Validator
- Returns:
- the resource bundle key
 
- 
getMessageParametersDescription copied from interface:ValidatorGets the message parameters to be used when parsing i18n messages- Specified by:
- getMessageParametersin interface- Validator
- Returns:
- the message parameters
 
- 
getValidatorContextDescription copied from interface:ValidatorGets the validation context used- Specified by:
- getValidatorContextin interface- Validator
- Returns:
- the validation context
 
- 
setDefaultMessageDescription copied from interface:ValidatorSets the default message to use for validation failure- Specified by:
- setDefaultMessagein interface- Validator
- Parameters:
- message- the default message
 
- 
setFieldNameDescription copied from interface:FieldValidatorSets the field name to validate with this FieldValidator- Specified by:
- setFieldNamein interface- FieldValidator
- Parameters:
- fieldName- the field name
 
- 
setMessageKeyDescription copied from interface:ValidatorSets a resource bundle key to be used for lookup of validation failure message- Specified by:
- setMessageKeyin interface- Validator
- Parameters:
- key- the resource bundle key
 
- 
setMessageParametersDescription copied from interface:ValidatorSets the message parameters to be used when parsing i18n messages- Specified by:
- setMessageParametersin interface- Validator
- Parameters:
- messageParameters- the message parameters
 
- 
setValidatorContextDescription copied from interface:ValidatorThis method will be called before validate with a non-null ValidatorContext.- Specified by:
- setValidatorContextin interface- Validator
- Parameters:
- validatorContext- the validation context to use.
 
- 
setValidatorTypeDescription copied from interface:ValidatorSets the validator type to use (see class javadoc).- Specified by:
- setValidatorTypein interface- Validator
- Parameters:
- type- the type to use.
 
- 
setValueStackDescription copied from interface:ValidatorSets the value stack to use to resolve values and parameters- Specified by:
- setValueStackin interface- Validator
- Parameters:
- stack- The value stack for the request
 
- 
validateDescription copied from interface:ValidatorThe validation implementation must guarantee that setValidatorContext will be called with a non-null ValidatorContext before validate is called.- Specified by:
- validatein interface- Validator
- Parameters:
- object- the object to be validated.
- Throws:
- ValidationException- is thrown if there is validation error(s).
 
- 
getNamePrefix
- 
setNamePrefix
 
-