|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.bind.support.ConfigurableWebBindingInitializer
public class ConfigurableWebBindingInitializer
Convenient WebBindingInitializer
for declarative configuration
in a Spring application context. Allows for reusing pre-configured
initializers with multiple controller/handlers.
setDirectFieldAccess(boolean)
,
setMessageCodesResolver(org.springframework.validation.MessageCodesResolver)
,
setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor)
,
setValidator(Validator)
,
setConversionService(ConversionService)
,
setPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)
Constructor Summary | |
---|---|
ConfigurableWebBindingInitializer()
|
Method Summary | |
---|---|
BindingErrorProcessor |
getBindingErrorProcessor()
Return the strategy to use for processing binding errors. |
ConversionService |
getConversionService()
Return the ConversionService which will apply to every DataBinder. |
MessageCodesResolver |
getMessageCodesResolver()
Return the strategy to use for resolving errors into message codes. |
PropertyEditorRegistrar[] |
getPropertyEditorRegistrars()
Return the PropertyEditorRegistrars to be applied to every DataBinder. |
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. |
void |
setBindingErrorProcessor(BindingErrorProcessor bindingErrorProcessor)
Set the strategy to use for processing binding errors, that is, required field errors and PropertyAccessException s. |
void |
setConversionService(ConversionService conversionService)
Specify a ConversionService which will apply to every DataBinder. |
void |
setDirectFieldAccess(boolean directFieldAccess)
Set whether to use direct field access instead of bean property access. |
void |
setMessageCodesResolver(MessageCodesResolver messageCodesResolver)
Set the strategy to use for resolving errors into message codes. |
void |
setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)
Specify a single PropertyEditorRegistrar to be applied to every DataBinder. |
void |
setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)
Specify multiple PropertyEditorRegistrars to be applied to every DataBinder. |
void |
setValidator(Validator validator)
Set the Validator to apply after each binding step. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurableWebBindingInitializer()
Method Detail |
---|
public final void setDirectFieldAccess(boolean directFieldAccess)
Default is false
, using bean property access.
Switch this to true
for enforcing direct field access.
public final void setMessageCodesResolver(MessageCodesResolver messageCodesResolver)
Default is null
, i.e. using the default strategy of
the data binder.
DataBinder.setMessageCodesResolver(org.springframework.validation.MessageCodesResolver)
public final MessageCodesResolver getMessageCodesResolver()
public final void setBindingErrorProcessor(BindingErrorProcessor bindingErrorProcessor)
PropertyAccessException
s.
Default is null
, that is, using the default strategy
of the data binder.
DataBinder.setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor)
public final BindingErrorProcessor getBindingErrorProcessor()
public final void setValidator(Validator validator)
public final Validator getValidator()
public final void setConversionService(ConversionService conversionService)
public final ConversionService getConversionService()
public final void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)
public final void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)
public final PropertyEditorRegistrar[] getPropertyEditorRegistrars()
public void initBinder(WebDataBinder binder, WebRequest request)
WebBindingInitializer
initBinder
in interface WebBindingInitializer
binder
- the DataBinder to initializerequest
- the web request that the data binding happens within
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |