Method Summary |
|
public void | addAllErrors(Errors errors) |
public void | addError(ObjectError error) |
protected String | canonicalFieldName(String field) Determine the canonical field name for the given field. |
protected void | doSetNestedPath(String nestedPath) Actually set the nested path. |
public boolean | equals(Object other) |
protected String | fixedField(String field) Transform the given field into its full path,
regarding the nested path of this instance. |
protected Object | formatFieldValue(String field, Object value) Format the given value for the specified field. |
abstract protected Object | getActualFieldValue(String field) Extract the actual field value for the given field. |
public List | getAllErrors() |
public int | getErrorCount() |
public FieldError | getFieldError() |
public FieldError | getFieldError(String field) |
public int | getFieldErrorCount() |
public int | getFieldErrorCount(String field) |
public List | getFieldErrors() |
public List | getFieldErrors(String field) |
public Class | getFieldType(String field) This default implementation determines the type based on the actual
field value, if any. |
public Object | getFieldValue(String field) |
public ObjectError | getGlobalError() |
public int | getGlobalErrorCount() |
public List | getGlobalErrors() |
public MessageCodesResolver | getMessageCodesResolver() Return the strategy to use for resolving errors into message codes. |
public Map | getModel() Return a model Map for the obtained state, exposing an Errors
instance as '
AbstractBindingResult.MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName'
and the object itself.
Note that the Map is constructed every time you're calling this method.
Adding things to the map and then re-calling this method will not work.
The attributes in the model Map returned by this method are usually
included in the ModelAndView for a form view that uses Spring's bind tag,
which needs access to the Errors instance. |
public String | getNestedPath() |
public String | getObjectName() |
public PropertyEditorRegistry | getPropertyEditorRegistry() This implementation throws an UnsupportedOperationException. |
public String[] | getSuppressedFields() Return the list of fields that were suppressed during the bind process. |
abstract public Object | getTarget() Return the wrapped target object. |
public boolean | hasErrors() |
public boolean | hasFieldErrors() |
public boolean | hasFieldErrors(String field) |
public boolean | hasGlobalErrors() |
public int | hashCode() |
protected boolean | isMatchingFieldError(String field, FieldError fieldError) Check whether the given FieldError matches the given field. |
public void | popNestedPath() |
public void | pushNestedPath(String subPath) |
public void | recordSuppressedField(String fieldName) Mark the specified disallowed field as suppressed. |
public void | reject(String errorCode) |
public void | reject(String errorCode, String defaultMessage) |
public void | reject(String errorCode, Object[] errorArgs, String defaultMessage) |
public void | rejectValue(String field, String errorCode) |
public void | rejectValue(String field, String errorCode, String defaultMessage) |
public void | rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage) |
public String[] | resolveMessageCodes(String errorCode) Resolve the given error code into message codes. |
public String[] | resolveMessageCodes(String errorCode, String field) |
public void | setMessageCodesResolver(MessageCodesResolver messageCodesResolver) Set the strategy to use for resolving errors into message codes. |
public void | setNestedPath(String nestedPath) |
public String | toString() |