public class DefaultDataBinderFactory extends Object implements WebDataBinderFactory
WebRequestDataBinder instance and initialize it with a
WebBindingInitializer.| Constructor and Description |
|---|
DefaultDataBinderFactory(WebBindingInitializer initializer)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
WebDataBinder |
createBinder(NativeWebRequest webRequest,
Object target,
String objectName)
Create a new
WebDataBinder for the given target object and
initialize it through a WebBindingInitializer. |
protected WebDataBinder |
createBinderInstance(Object target,
String objectName,
NativeWebRequest webRequest)
Extension point to create the WebDataBinder instance.
|
protected void |
initBinder(WebDataBinder dataBinder,
NativeWebRequest webRequest)
Extension point to further initialize the created data binder instance
(e.g.
|
public DefaultDataBinderFactory(WebBindingInitializer initializer)
initializer - for global data binder intialization, or nullpublic final WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception
WebDataBinder for the given target object and
initialize it through a WebBindingInitializer.createBinder in interface WebDataBinderFactorywebRequest - the current requesttarget - the object to create a data binder for, or null if creating a binder for a simple typeobjectName - the name of the target objectWebDataBinder instance, never nullException - in case of invalid state or argumentsprotected WebDataBinder createBinderInstance(Object target, String objectName, NativeWebRequest webRequest) throws Exception
WebRequestDataBinder.target - the binding target or null for type conversion onlyobjectName - the binding target object namewebRequest - the current requestException - in case of invalid state or argumentsprotected void initBinder(WebDataBinder dataBinder, NativeWebRequest webRequest) throws Exception
@InitBinder methods) after "global" initializaton
via WebBindingInitializer.dataBinder - the data binder instance to customizewebRequest - the current requestException - if initialization fails