Class EscapedErrors
java.lang.Object
org.springframework.web.bind.EscapedErrors
- All Implemented Interfaces:
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:
-
Field Summary
Fields inherited from interface org.springframework.validation.Errors
NESTED_PATH_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionEscapedErrors(org.springframework.validation.Errors source) Create a new EscapedErrors instance for the given source instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllErrors(org.springframework.validation.Errors errors) List<org.springframework.validation.ObjectError> int@Nullable org.springframework.validation.FieldError@Nullable org.springframework.validation.FieldErrorgetFieldError(String field) intintgetFieldErrorCount(String field) List<org.springframework.validation.FieldError> List<org.springframework.validation.FieldError> getFieldErrors(String field) getFieldType(String field) getFieldValue(String field) @Nullable org.springframework.validation.ObjectErrorintList<org.springframework.validation.ObjectError> org.springframework.validation.ErrorsbooleanbooleanbooleanhasFieldErrors(String field) booleanvoidvoidpushNestedPath(String subPath) voidvoidvoidvoidrejectValue(@Nullable String field, String errorCode) voidrejectValue(@Nullable String field, String errorCode, Object @Nullable [] errorArgs, @Nullable String defaultMessage) voidrejectValue(@Nullable String field, String errorCode, String defaultMessage) voidsetNestedPath(String nestedPath) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
- Specified by:
getObjectNamein interfaceorg.springframework.validation.Errors
-
setNestedPath
- Specified by:
setNestedPathin interfaceorg.springframework.validation.Errors
-
getNestedPath
- Specified by:
getNestedPathin interfaceorg.springframework.validation.Errors
-
pushNestedPath
- Specified by:
pushNestedPathin interfaceorg.springframework.validation.Errors
-
popNestedPath
- Specified by:
popNestedPathin interfaceorg.springframework.validation.Errors- Throws:
IllegalStateException
-
reject
- Specified by:
rejectin interfaceorg.springframework.validation.Errors
-
reject
-
reject
-
rejectValue
-
rejectValue
-
rejectValue
-
addAllErrors
public void addAllErrors(org.springframework.validation.Errors errors) - Specified by:
addAllErrorsin interfaceorg.springframework.validation.Errors
-
hasErrors
public boolean hasErrors()- Specified by:
hasErrorsin interfaceorg.springframework.validation.Errors
-
getErrorCount
public int getErrorCount()- Specified by:
getErrorCountin interfaceorg.springframework.validation.Errors
-
getAllErrors
- Specified by:
getAllErrorsin interfaceorg.springframework.validation.Errors
-
hasGlobalErrors
public boolean hasGlobalErrors()- Specified by:
hasGlobalErrorsin interfaceorg.springframework.validation.Errors
-
getGlobalErrorCount
public int getGlobalErrorCount()- Specified by:
getGlobalErrorCountin interfaceorg.springframework.validation.Errors
-
getGlobalErrors
- Specified by:
getGlobalErrorsin interfaceorg.springframework.validation.Errors
-
getGlobalError
- Specified by:
getGlobalErrorin interfaceorg.springframework.validation.Errors
-
hasFieldErrors
public boolean hasFieldErrors()- Specified by:
hasFieldErrorsin interfaceorg.springframework.validation.Errors
-
getFieldErrorCount
public int getFieldErrorCount()- Specified by:
getFieldErrorCountin interfaceorg.springframework.validation.Errors
-
getFieldErrors
- Specified by:
getFieldErrorsin interfaceorg.springframework.validation.Errors
-
getFieldError
- Specified by:
getFieldErrorin interfaceorg.springframework.validation.Errors
-
hasFieldErrors
- Specified by:
hasFieldErrorsin interfaceorg.springframework.validation.Errors
-
getFieldErrorCount
- Specified by:
getFieldErrorCountin interfaceorg.springframework.validation.Errors
-
getFieldErrors
-
getFieldError
-
getFieldValue
-
getFieldType
-