Data Binding happens in spring mvc when it submits a command object from a form. Command objects of any type used to transport data between presentation and controller layers.
When ever data transfers across these layers the core servlet (or servlet api) treats these parameters as string instead of objects of specific type.
Spring data binding enables the user to set the property values on a command object which are entered from a form.
DataBinder uses PropertyEditor (PropertyEditors basically part of Sun JavaBean API) for converting the object to string type and vice versa.
It is a better practice to explicitly register the PropertyEditor in initBinder() method for a particular controller class.
No comments:
Post a Comment