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 java.lang.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
| Fields inherited from interface org.springframework.validation.Errors |
NESTED_PATH_SEPARATOR |
|
Constructor Summary |
EscapedErrors(org.springframework.validation.Errors source)
Create a new EscapedErrors instance for the given source instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EscapedErrors
public EscapedErrors(org.springframework.validation.Errors source)
- Create a new EscapedErrors instance for the given source instance.
getSource
public org.springframework.validation.Errors getSource()
getObjectName
public java.lang.String getObjectName()
- Specified by:
getObjectName in interface org.springframework.validation.Errors
setNestedPath
public void setNestedPath(java.lang.String nestedPath)
- Specified by:
setNestedPath in interface org.springframework.validation.Errors
getNestedPath
public java.lang.String getNestedPath()
- Specified by:
getNestedPath in interface org.springframework.validation.Errors
pushNestedPath
public void pushNestedPath(java.lang.String subPath)
- Specified by:
pushNestedPath in interface org.springframework.validation.Errors
popNestedPath
public void popNestedPath()
throws java.lang.IllegalStateException
- Specified by:
popNestedPath in interface org.springframework.validation.Errors
- Throws:
java.lang.IllegalStateException
reject
public void reject(java.lang.String errorCode)
- Specified by:
reject in interface org.springframework.validation.Errors
reject
public void reject(java.lang.String errorCode,
java.lang.String defaultMessage)
- Specified by:
reject in interface org.springframework.validation.Errors
reject
public void reject(java.lang.String errorCode,
java.lang.Object[] errorArgs,
java.lang.String defaultMessage)
- Specified by:
reject in interface org.springframework.validation.Errors
rejectValue
public void rejectValue(java.lang.String field,
java.lang.String errorCode)
- Specified by:
rejectValue in interface org.springframework.validation.Errors
rejectValue
public void rejectValue(java.lang.String field,
java.lang.String errorCode,
java.lang.String defaultMessage)
- Specified by:
rejectValue in interface org.springframework.validation.Errors
rejectValue
public void rejectValue(java.lang.String field,
java.lang.String errorCode,
java.lang.Object[] errorArgs,
java.lang.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 java.util.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 java.util.List<org.springframework.validation.ObjectError> getGlobalErrors()
- Specified by:
getGlobalErrors in interface org.springframework.validation.Errors
getGlobalError
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 java.util.List<org.springframework.validation.FieldError> getFieldErrors()
- Specified by:
getFieldErrors in interface org.springframework.validation.Errors
getFieldError
public org.springframework.validation.FieldError getFieldError()
- Specified by:
getFieldError in interface org.springframework.validation.Errors
hasFieldErrors
public boolean hasFieldErrors(java.lang.String field)
- Specified by:
hasFieldErrors in interface org.springframework.validation.Errors
getFieldErrorCount
public int getFieldErrorCount(java.lang.String field)
- Specified by:
getFieldErrorCount in interface org.springframework.validation.Errors
getFieldErrors
public java.util.List<org.springframework.validation.FieldError> getFieldErrors(java.lang.String field)
- Specified by:
getFieldErrors in interface org.springframework.validation.Errors
getFieldError
public org.springframework.validation.FieldError getFieldError(java.lang.String field)
- Specified by:
getFieldError in interface org.springframework.validation.Errors
getFieldValue
public java.lang.Object getFieldValue(java.lang.String field)
- Specified by:
getFieldValue in interface org.springframework.validation.Errors
getFieldType
public java.lang.Class getFieldType(java.lang.String field)
- Specified by:
getFieldType in interface org.springframework.validation.Errors