Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.web.bind.support
Class ConfigurableWebBindingInitializer

    java.lang.Object
      org.springframework.web.bind.support.ConfigurableWebBindingInitializer

All Implemented Interfaces:
  WebBindingInitializer

    public class ConfigurableWebBindingInitializer

extends Object
implements WebBindingInitializer

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

Since:
  2.5
Author:
  Juergen Hoeller
See Also:
  `setDirectFieldAccess(boolean)`, `setMessageCodesResolver(org.springframework.validation.MessageCodesResolver)`, `setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor)`, `setPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)`

Constructor Summary
`ConfigurableWebBindingInitializer()`

Method Summary
`BindingErrorProcessor` | `getBindingErrorProcessor()` Return the strategy to use for processing binding errors.
`MessageCodesResolver` | `getMessageCodesResolver()` Return the strategy to use for resolving errors into message codes.
`PropertyEditorRegistrar[]` | `getPropertyEditorRegistrars()` Return the PropertyEditorRegistrars to be applied to every DataBinder that this controller uses.
`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` | `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 that this controller uses.
`void` | `setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)` Specify multiple PropertyEditorRegistrars to be applied to every DataBinder that this controller uses.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConfigurableWebBindingInitializer

    public ConfigurableWebBindingInitializer()

Method Detail

### setDirectFieldAccess

    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.

### setMessageCodesResolver

    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.

  See Also:
    `DataBinder.setMessageCodesResolver(org.springframework.validation.MessageCodesResolver)`

### getMessageCodesResolver

    public final MessageCodesResolver getMessageCodesResolver()

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

### setBindingErrorProcessor

    public final void setBindingErrorProcessor(BindingErrorProcessor bindingErrorProcessor)

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

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

  See Also:
    `DataBinder.setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor)`

### getBindingErrorProcessor

    public final BindingErrorProcessor getBindingErrorProcessor()

  Return the strategy to use for processing binding errors.

### setPropertyEditorRegistrar

    public final void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)

  Specify a single PropertyEditorRegistrar to be applied to every DataBinder that this controller uses.

### setPropertyEditorRegistrars

    public final void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)

  Specify multiple PropertyEditorRegistrars to be applied to every DataBinder that this controller uses.

### getPropertyEditorRegistrars

    public final PropertyEditorRegistrar[] getPropertyEditorRegistrars()

  Return the PropertyEditorRegistrars to be applied to every DataBinder that this controller uses.

### initBinder

    public void initBinder(WebDataBinder binder,
                           WebRequest request)

  Description copied from interface: `WebBindingInitializer`
  Initialize the given DataBinder for the given request.

  Specified by:
    `initBinder` in interface `WebBindingInitializer`
  Parameters:
    `binder` - the DataBinder to initialize
    `request` - the web request that the data binding happens within

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2007 The Spring Framework.