public class EscapedErrors extends Object implements org.springframework.validation.Errors
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.
org.springframework.web.servlet.support.RequestContext#getErrors
,
org.springframework.web.servlet.tags.BindTag
Constructor and Description |
---|
EscapedErrors(org.springframework.validation.Errors source)
Create a new EscapedErrors instance for the given source instance.
|
Modifier and Type | Method and 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) |
public EscapedErrors(org.springframework.validation.Errors source)
public org.springframework.validation.Errors getSource()
public String getObjectName()
getObjectName
in interface org.springframework.validation.Errors
public void setNestedPath(String nestedPath)
setNestedPath
in interface org.springframework.validation.Errors
public String getNestedPath()
getNestedPath
in interface org.springframework.validation.Errors
public void pushNestedPath(String subPath)
pushNestedPath
in interface org.springframework.validation.Errors
public void popNestedPath() throws IllegalStateException
popNestedPath
in interface org.springframework.validation.Errors
IllegalStateException
public void reject(String errorCode)
reject
in interface org.springframework.validation.Errors
public void reject(String errorCode, String defaultMessage)
reject
in interface org.springframework.validation.Errors
public void reject(String errorCode, Object[] errorArgs, String defaultMessage)
reject
in interface org.springframework.validation.Errors
public void rejectValue(String field, String errorCode)
rejectValue
in interface org.springframework.validation.Errors
public void rejectValue(String field, String errorCode, String defaultMessage)
rejectValue
in interface org.springframework.validation.Errors
public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage)
rejectValue
in interface org.springframework.validation.Errors
public void addAllErrors(org.springframework.validation.Errors errors)
addAllErrors
in interface org.springframework.validation.Errors
public boolean hasErrors()
hasErrors
in interface org.springframework.validation.Errors
public int getErrorCount()
getErrorCount
in interface org.springframework.validation.Errors
public List<org.springframework.validation.ObjectError> getAllErrors()
getAllErrors
in interface org.springframework.validation.Errors
public boolean hasGlobalErrors()
hasGlobalErrors
in interface org.springframework.validation.Errors
public int getGlobalErrorCount()
getGlobalErrorCount
in interface org.springframework.validation.Errors
public List<org.springframework.validation.ObjectError> getGlobalErrors()
getGlobalErrors
in interface org.springframework.validation.Errors
public org.springframework.validation.ObjectError getGlobalError()
getGlobalError
in interface org.springframework.validation.Errors
public boolean hasFieldErrors()
hasFieldErrors
in interface org.springframework.validation.Errors
public int getFieldErrorCount()
getFieldErrorCount
in interface org.springframework.validation.Errors
public List<org.springframework.validation.FieldError> getFieldErrors()
getFieldErrors
in interface org.springframework.validation.Errors
public org.springframework.validation.FieldError getFieldError()
getFieldError
in interface org.springframework.validation.Errors
public boolean hasFieldErrors(String field)
hasFieldErrors
in interface org.springframework.validation.Errors
public int getFieldErrorCount(String field)
getFieldErrorCount
in interface org.springframework.validation.Errors
public List<org.springframework.validation.FieldError> getFieldErrors(String field)
getFieldErrors
in interface org.springframework.validation.Errors
public org.springframework.validation.FieldError getFieldError(String field)
getFieldError
in interface org.springframework.validation.Errors
public Object getFieldValue(String field)
getFieldValue
in interface org.springframework.validation.Errors