Package org.apache.struts2.validator.validators

# Class VisitorFieldValidator.AppendingValidatorContext

java.lang.Object
org.apache.struts2.validator.DelegatingValidatorContext
org.apache.struts2.validator.validators.VisitorFieldValidator.AppendingValidatorContext

All Implemented Interfaces:
  `ValidationAware`, `LocaleProvider`, `TextProvider`, `ValidatorContext`

Enclosing class:
  VisitorFieldValidator

public static class VisitorFieldValidator.AppendingValidatorContext extends DelegatingValidatorContext

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AppendingValidatorContext(ValidatorContext parent, TextProvider textProvider, String field, String message)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addActionError(String anErrorMessage)`
  Add an Action-level error message to this Action.
  `void`
  `addFieldError(String fieldName, String errorMessage)`
  Add an error message for a given field.
  `String`
  `getFieldNameWithField(String fieldName)`
  `String`
  `getFullFieldName(String fieldName)`
  Translates a simple field name into a full field name in Ognl syntax

  ### Methods inherited from class org.apache.struts2.validator.DelegatingValidatorContext

  `addActionMessage, getActionErrors, getActionMessages, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getValidationAware, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, isValidLocale, isValidLocaleString, makeLocaleProvider, makeTextProvider, makeValidationAware, setActionErrors, setActionMessages, setFieldErrors, setTextProvider, setValidationAware, toLocale`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AppendingValidatorContext

    public AppendingValidatorContext(ValidatorContext parent, TextProvider textProvider, String field, String message)

- ## Method Details

  - ### getFullFieldName

    public String getFullFieldName(String fieldName)
    Translates a simple field name into a full field name in Ognl syntax
    Specified by:
      `getFullFieldName` in interface `ValidatorContext`
    Overrides:
      `getFullFieldName` in class `DelegatingValidatorContext`
    Parameters:
      `fieldName` - field name in OGNL syntax
    Returns:
      full field name in OGNL syntax

  - ### getFieldNameWithField

    public String getFieldNameWithField(String fieldName)

  - ### addActionError

    public void addActionError(String anErrorMessage)
    Description copied from interface: `ValidationAware`
    Add an Action-level error message to this Action.
    Specified by:
      `addActionError` in interface `ValidationAware`
    Overrides:
      `addActionError` in class `DelegatingValidatorContext`
    Parameters:
      `anErrorMessage` - the error message

  - ### addFieldError

    public void addFieldError(String fieldName, String errorMessage)
    Description copied from interface: `ValidationAware`
    Add an error message for a given field.
    Specified by:
      `addFieldError` in interface `ValidationAware`
    Overrides:
      `addFieldError` in class `DelegatingValidatorContext`
    Parameters:
      `fieldName` - name of field
      `errorMessage` - the error message