public interface BindingResult extends Errors(Code)
General interface that represents binding results. Extends the
Errors interface for error registration capabilities,
allowing for a
Validator to be applied, and adds
binding-specific analysis and model building.
getModel() Return a model Map for the obtained state, exposing a BindingResult
instance as '
BindingResult.MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName'
and the object itself as 'objectName'.
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
org.springframework.web.servlet.ModelAndView for a form view that uses Spring's bind tag in a JSP,
which needs access to the BindingResult instance.
Return a model Map for the obtained state, exposing a BindingResult
instance as '
BindingResult.MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName'
and the object itself as 'objectName'.
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.
Resolve the given error code into message codes for the given field.
Calls the configured
MessageCodesResolver with appropriate parameters.
Parameters: errorCode - the error code to resolve into message codes Parameters: field - the field to resolve message codes for the resolved message codes