Errors can be chained to provide additional context. To add context, call {@link #withSource}to create a new Errors instance that contains additional context. All messages added to the returned instance will contain full context.
To avoid messages with redundant context, {@link #withSource} should be added sparingly. Agood rule of thumb is to assume a ethod's caller has already specified enough context to identify that method. When calling a method that's defined in a different context, call that method with an errors object that includes its context. @author jessewilson@google.com (Jesse Wilson)
Errors can be chained to provide additional context. To add context, call {@link #withSource}to create a new Errors instance that contains additional context. All messages added to the returned instance will contain full context.
To avoid messages with redundant context, {@link #withSource} should be added sparingly. Agood rule of thumb is to assume a ethod's caller has already specified enough context to identify that method. When calling a method that's defined in a different context, call that method with an errors object that includes its context. @author jessewilson@google.com (Jesse Wilson)
Field names can be properties of the target object (e.g. "name" when binding to a customer object), or nested fields in case of subobjects (e.g. "address.street"). Supports subtree navigation via {@link #setNestedPath(String)}: for example, an AddressValidator
validates "address", not being aware that this is a subobject of customer.
Note: Errors
objects are single-threaded.
@author Rod Johnson
@author Juergen Hoeller
@see #setNestedPath
@see BindException
@see DataBinder
@see ValidationUtils
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|