Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.components
Class Form.FieldVisitorValidatorWrapper

    java.lang.Object
      org.apache.struts2.components.Form.FieldVisitorValidatorWrapper

All Implemented Interfaces:
  FieldValidator, Validator

Enclosing class:
  Form

    public static class Form.FieldVisitorValidatorWrapper

extends Object
implements FieldValidator

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 Summary
`Form.FieldVisitorValidatorWrapper(FieldValidator fv, String namePrefix)`

Method Summary
`String` | `getDefaultMessage()`
`String` | `getFieldName()`
`FieldValidator` | `getFieldValidator()`
`String` | `getMessage(Object object)`
`String` | `getMessageKey()`
`String[]` | `getMessageParameters()`
`String` | `getNamePrefix()`
`ValidatorContext` | `getValidatorContext()`
`String` | `getValidatorType()`
`void` | `setDefaultMessage(String message)`
`void` | `setFieldName(String fieldName)`
`void` | `setFieldValidator(FieldValidator fieldValidator)`
`void` | `setMessageKey(String key)`
`void` | `setMessageParameters(String[] messageParameters)`
`void` | `setNamePrefix(String namePrefix)`
`void` | `setValidatorContext(ValidatorContext validatorContext)`
`void` | `setValidatorType(String type)`
`void` | `setValueStack(ValueStack stack)`
`void` | `validate(Object object)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Form.FieldVisitorValidatorWrapper

    public Form.FieldVisitorValidatorWrapper(FieldValidator fv,
                                             String namePrefix)

Method Detail

### getValidatorType

    public String getValidatorType()

  Specified by:
    `getValidatorType` in interface `Validator`

### getFieldName

    public String getFieldName()

  Specified by:
    `getFieldName` in interface `FieldValidator`

### getFieldValidator

    public FieldValidator getFieldValidator()

### setFieldValidator

    public void setFieldValidator(FieldValidator fieldValidator)

### getDefaultMessage

    public String getDefaultMessage()

  Specified by:
    `getDefaultMessage` in interface `Validator`

### getMessage

    public String getMessage(Object object)

  Specified by:
    `getMessage` in interface `Validator`

### getMessageKey

    public String getMessageKey()

  Specified by:
    `getMessageKey` in interface `Validator`

### getMessageParameters

    public String[] getMessageParameters()

  Specified by:
    `getMessageParameters` in interface `Validator`

### getValidatorContext

    public ValidatorContext getValidatorContext()

  Specified by:
    `getValidatorContext` in interface `Validator`

### setDefaultMessage

    public void setDefaultMessage(String message)

  Specified by:
    `setDefaultMessage` in interface `Validator`

### setFieldName

    public void setFieldName(String fieldName)

  Specified by:
    `setFieldName` in interface `FieldValidator`

### setMessageKey

    public void setMessageKey(String key)

  Specified by:
    `setMessageKey` in interface `Validator`

### setMessageParameters

    public void setMessageParameters(String[] messageParameters)

  Specified by:
    `setMessageParameters` in interface `Validator`

### setValidatorContext

    public void setValidatorContext(ValidatorContext validatorContext)

  Specified by:
    `setValidatorContext` in interface `Validator`

### setValidatorType

    public void setValidatorType(String type)

  Specified by:
    `setValidatorType` in interface `Validator`

### setValueStack

    public void setValueStack(ValueStack stack)

  Specified by:
    `setValueStack` in interface `Validator`

### validate

    public void validate(Object object)
                  throws ValidationException

  Specified by:
    `validate` in interface `Validator`
  Throws:
    `ValidationException`

### getNamePrefix

    public String getNamePrefix()

### setNamePrefix

    public void setNamePrefix(String namePrefix)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.