Package org.springframework.web.bind

# Class EscapedErrors

java.lang.Object
org.springframework.web.bind.EscapedErrors

All Implemented Interfaces:
  `org.springframework.validation.Errors`

public class EscapedErrors extends Object implements org.springframework.validation.Errors
Errors wrapper that adds automatic HTML escaping to the wrapped instance, for convenient usage in HTML views. Can be retrieved easily via RequestContext's `getErrors` method.

Note that BindTag does not use this class to avoid unnecessary creation of ObjectError instances. It just escapes the messages and values that get copied into the respective BindStatus instance.

Since:
  01.03.2003
Author:
  Juergen Hoeller
See Also:
  - `org.springframework.web.servlet.support.RequestContext#getErrors`
  - `org.springframework.web.servlet.tags.BindTag`

## Field Summary

### Fields inherited from interface org.springframework.validation.Errors

`NESTED_PATH_SEPARATOR`

## Constructor Summary

Constructors
Constructor
Description
`EscapedErrors(org.springframework.validation.Errors source)`
Create a new EscapedErrors instance for the given source instance.

## Method Summary

Modifier and Type
Method
Description
`void`
`addAllErrors(org.springframework.validation.Errors errors)`
`List<org.springframework.validation.ObjectError>`
`getAllErrors()`
`int`
`getErrorCount()`
`org.springframework.validation.FieldError`
`getFieldError()`
`org.springframework.validation.FieldError`
`getFieldError(String field)`
`int`
`getFieldErrorCount()`
`int`
`getFieldErrorCount(String field)`
`List<org.springframework.validation.FieldError>`
`getFieldErrors()`
`List<org.springframework.validation.FieldError>`
`getFieldErrors(String field)`
`Class<?>`
`getFieldType(String field)`
`Object`
`getFieldValue(String field)`
`org.springframework.validation.ObjectError`
`getGlobalError()`
`int`
`getGlobalErrorCount()`
`List<org.springframework.validation.ObjectError>`
`getGlobalErrors()`
`String`
`getNestedPath()`
`String`
`getObjectName()`
`org.springframework.validation.Errors`
`getSource()`
`boolean`
`hasErrors()`
`boolean`
`hasFieldErrors()`
`boolean`
`hasFieldErrors(String field)`
`boolean`
`hasGlobalErrors()`
`void`
`popNestedPath()`
`void`
`pushNestedPath(String subPath)`
`void`
`reject(String errorCode)`
`void`
`reject(String errorCode, Object[] errorArgs, String defaultMessage)`
`void`
`reject(String errorCode, String defaultMessage)`
`void`
`rejectValue(String field, String errorCode)`
`void`
`rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage)`
`void`
`rejectValue(String field, String errorCode, String defaultMessage)`
`void`
`setNestedPath(String nestedPath)`

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

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

### Methods inherited from interface org.springframework.validation.Errors

`failOnError, toString`

## Constructor Details

### EscapedErrors

public EscapedErrors(org.springframework.validation.Errors source)
Create a new EscapedErrors instance for the given source instance.

## Method Details

### getSource

public org.springframework.validation.Errors getSource()

### getObjectName

public String getObjectName()

Specified by:
  `getObjectName` in interface `org.springframework.validation.Errors`

### setNestedPath

public void setNestedPath(String nestedPath)

Specified by:
  `setNestedPath` in interface `org.springframework.validation.Errors`

### getNestedPath

public String getNestedPath()

Specified by:
  `getNestedPath` in interface `org.springframework.validation.Errors`

### pushNestedPath

public void pushNestedPath(String subPath)

Specified by:
  `pushNestedPath` in interface `org.springframework.validation.Errors`

### popNestedPath

public void popNestedPath() throws IllegalStateException

Specified by:
  `popNestedPath` in interface `org.springframework.validation.Errors`
Throws:
  `IllegalStateException`

### reject

public void reject(String errorCode)

Specified by:
  `reject` in interface `org.springframework.validation.Errors`

### reject

public void reject(String errorCode, String defaultMessage)

Specified by:
  `reject` in interface `org.springframework.validation.Errors`

### reject

public void reject(String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage)

Specified by:
  `reject` in interface `org.springframework.validation.Errors`

### rejectValue

public void rejectValue(@Nullable String field, String errorCode)

Specified by:
  `rejectValue` in interface `org.springframework.validation.Errors`

### rejectValue

public void rejectValue(@Nullable String field, String errorCode, String defaultMessage)

Specified by:
  `rejectValue` in interface `org.springframework.validation.Errors`

### rejectValue

public void rejectValue(@Nullable String field, String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage)

Specified by:
  `rejectValue` in interface `org.springframework.validation.Errors`

### addAllErrors

public void addAllErrors(org.springframework.validation.Errors errors)

Specified by:
  `addAllErrors` in interface `org.springframework.validation.Errors`

### hasErrors

public boolean hasErrors()

Specified by:
  `hasErrors` in interface `org.springframework.validation.Errors`

### getErrorCount

public int getErrorCount()

Specified by:
  `getErrorCount` in interface `org.springframework.validation.Errors`

### getAllErrors

public List<org.springframework.validation.ObjectError> getAllErrors()

Specified by:
  `getAllErrors` in interface `org.springframework.validation.Errors`

### hasGlobalErrors

public boolean hasGlobalErrors()

Specified by:
  `hasGlobalErrors` in interface `org.springframework.validation.Errors`

### getGlobalErrorCount

public int getGlobalErrorCount()

Specified by:
  `getGlobalErrorCount` in interface `org.springframework.validation.Errors`

### getGlobalErrors

public List<org.springframework.validation.ObjectError> getGlobalErrors()

Specified by:
  `getGlobalErrors` in interface `org.springframework.validation.Errors`

### getGlobalError

@Nullable public org.springframework.validation.ObjectError getGlobalError()

Specified by:
  `getGlobalError` in interface `org.springframework.validation.Errors`

### hasFieldErrors

public boolean hasFieldErrors()

Specified by:
  `hasFieldErrors` in interface `org.springframework.validation.Errors`

### getFieldErrorCount

public int getFieldErrorCount()

Specified by:
  `getFieldErrorCount` in interface `org.springframework.validation.Errors`

### getFieldErrors

public List<org.springframework.validation.FieldError> getFieldErrors()

Specified by:
  `getFieldErrors` in interface `org.springframework.validation.Errors`

### getFieldError

@Nullable public org.springframework.validation.FieldError getFieldError()

Specified by:
  `getFieldError` in interface `org.springframework.validation.Errors`

### hasFieldErrors

public boolean hasFieldErrors(String field)

Specified by:
  `hasFieldErrors` in interface `org.springframework.validation.Errors`

### getFieldErrorCount

public int getFieldErrorCount(String field)

Specified by:
  `getFieldErrorCount` in interface `org.springframework.validation.Errors`

### getFieldErrors

public List<org.springframework.validation.FieldError> getFieldErrors(String field)

Specified by:
  `getFieldErrors` in interface `org.springframework.validation.Errors`

### getFieldError

@Nullable public org.springframework.validation.FieldError getFieldError(String field)

Specified by:
  `getFieldError` in interface `org.springframework.validation.Errors`

### getFieldValue

@Nullable public Object getFieldValue(String field)

Specified by:
  `getFieldValue` in interface `org.springframework.validation.Errors`

### getFieldType

@Nullable public Class<?> getFieldType(String field)

Specified by:
  `getFieldType` in interface `org.springframework.validation.Errors`