public class

ConfigurableWebBindingInitializer

extends Object
implements WebBindingInitializer
java.lang.Object
   ↳ org.springframework.web.bind.support.ConfigurableWebBindingInitializer

Class Overview

Convenient WebBindingInitializer for declarative configuration in a Spring application context. Allows for reusing pre-configured initializers with multiple controller/handlers.

Summary

Public Constructors
ConfigurableWebBindingInitializer()
Public Methods
final BindingErrorProcessor getBindingErrorProcessor()
Return the strategy to use for processing binding errors.
final ConversionService getConversionService()
Return the ConversionService which will apply to every DataBinder.
final MessageCodesResolver getMessageCodesResolver()
Return the strategy to use for resolving errors into message codes.
final PropertyEditorRegistrar[] getPropertyEditorRegistrars()
Return the PropertyEditorRegistrars to be applied to every DataBinder.
final Validator getValidator()
Return the Validator to apply after each binding step, if any.
void initBinder(WebDataBinder binder, WebRequest request)
Initialize the given DataBinder for the given request.
final void setBindingErrorProcessor(BindingErrorProcessor bindingErrorProcessor)
Set the strategy to use for processing binding errors, that is, required field errors and PropertyAccessExceptions.
final void setConversionService(ConversionService conversionService)
Specify a ConversionService which will apply to every DataBinder.
final void setDirectFieldAccess(boolean directFieldAccess)
Set whether to use direct field access instead of bean property access.
final void setMessageCodesResolver(MessageCodesResolver messageCodesResolver)
Set the strategy to use for resolving errors into message codes.
final void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)
Specify a single PropertyEditorRegistrar to be applied to every DataBinder.
final void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)
Specify multiple PropertyEditorRegistrars to be applied to every DataBinder.
final void setValidator(Validator validator)
Set the Validator to apply after each binding step.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.web.bind.support.WebBindingInitializer

Public Constructors

public ConfigurableWebBindingInitializer ()

Public Methods

public final BindingErrorProcessor getBindingErrorProcessor ()

Return the strategy to use for processing binding errors.

public final ConversionService getConversionService ()

Return the ConversionService which will apply to every DataBinder.

public final MessageCodesResolver getMessageCodesResolver ()

Return the strategy to use for resolving errors into message codes.

public final PropertyEditorRegistrar[] getPropertyEditorRegistrars ()

Return the PropertyEditorRegistrars to be applied to every DataBinder.

public final Validator getValidator ()

Return the Validator to apply after each binding step, if any.

public void initBinder (WebDataBinder binder, WebRequest request)

Initialize the given DataBinder for the given request.

Parameters
binder the DataBinder to initialize
request the web request that the data binding happens within

public final void setBindingErrorProcessor (BindingErrorProcessor bindingErrorProcessor)

Set the strategy to use for processing binding errors, that is, required field errors and PropertyAccessExceptions.

Default is null, that is, using the default strategy of the data binder.

public final void setConversionService (ConversionService conversionService)

Specify a ConversionService which will apply to every DataBinder.

public final void setDirectFieldAccess (boolean directFieldAccess)

Set whether to use direct field access instead of bean property access.

Default is false, using bean property access. Switch this to true for enforcing direct field access.

public final void setMessageCodesResolver (MessageCodesResolver messageCodesResolver)

Set the strategy to use for resolving errors into message codes. Applies the given strategy to all data binders used by this controller.

Default is null, i.e. using the default strategy of the data binder.

public final void setPropertyEditorRegistrar (PropertyEditorRegistrar propertyEditorRegistrar)

Specify a single PropertyEditorRegistrar to be applied to every DataBinder.

public final void setPropertyEditorRegistrars (PropertyEditorRegistrar[] propertyEditorRegistrars)

Specify multiple PropertyEditorRegistrars to be applied to every DataBinder.

public final void setValidator (Validator validator)

Set the Validator to apply after each binding step.