Top Description Methods
org.springframework.web.bind.support

public Interface WebDataBinderFactory

Known Direct Implementers
org.springframework.web.bind.support.DefaultDataBinderFactory
Imports
org.springframework.core.ResolvableType, org.springframework.lang.Nullable, org.springframework.web.bind.WebDataBinder, org.springframework.web.context.request.NativeWebRequest

A factory for creating a WebDataBinder instance for a named target object.
Authors
Arjen Poutsma, Rossen Stoyanchev
Since
3.1

Method Summary

Modifier and TypeMethod and Description
public WebDataBinder

Returns:

the created WebDataBinder instance, never null
createBinder
(NativeWebRequest
the current request
webRequest
,
Object
the object to create a data binder for, or null if creating a binder for a simple type
target
,
String
the name of the target object
objectName
)

Create a WebDataBinder for the given object.

public default WebDataBinder
createBinder(NativeWebRequest webRequest, Object target, String objectName, ResolvableType targetType)

Variant of createBinder(NativeWebRequest, Object, String) with a ResolvableType for which the DataBinder is created.

Method Detail

createBinderback to summary
public WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception

Create a WebDataBinder for the given object.

Parameters
webRequest:NativeWebRequest

the current request

target:Object

the object to create a data binder for, or null if creating a binder for a simple type

objectName:String

the name of the target object

Returns:WebDataBinder

the created WebDataBinder instance, never null

Exceptions
Exception:
raised if the creation and initialization of the data binder fails
createBinderback to summary
public default WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName, ResolvableType targetType) throws Exception

Variant of createBinder(NativeWebRequest, Object, String) with a ResolvableType for which the DataBinder is created. This may be used to construct the target, or otherwise provide more insight on how to initialize the binder.

Since
6.1