org.springframework.web.bind.support

Class ConfigurableWebBindingInitializer

  • java.lang.Object
    • org.springframework.web.bind.support.ConfigurableWebBindingInitializer
    • Constructor Detail

      • ConfigurableWebBindingInitializer

        public ConfigurableWebBindingInitializer()
    • Method Detail

      • setAutoGrowNestedPaths

        public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths)
        Set whether a binder should attempt to "auto-grow" a nested path that contains a null value.

        If "true", a null path location will be populated with a default object value and traversed instead of resulting in an exception. This flag also enables auto-growth of collection elements when accessing an out-of-bounds index.

        Default is "true" on a standard DataBinder. Note that this feature is only supported for bean property access (DataBinder's default mode), not for field access.

        See Also:
        DataBinder.initBeanPropertyAccess(), DataBinder.setAutoGrowNestedPaths(boolean)
      • isAutoGrowNestedPaths

        public boolean isAutoGrowNestedPaths()
        Return whether a binder should attempt to "auto-grow" a nested path that contains a null value.
      • 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 in order to enforce direct field access.

        See Also:
        DataBinder.initDirectFieldAccess(), DataBinder.initBeanPropertyAccess()
      • isDirectFieldAccess

        public boolean isDirectFieldAccess()
        Return whether to use direct field access instead of bean property access.
      • getMessageCodesResolver

        @Nullable
        public final MessageCodesResolver getMessageCodesResolver()
        Return the strategy to use for resolving errors into message codes.
      • getBindingErrorProcessor

        @Nullable
        public final BindingErrorProcessor getBindingErrorProcessor()
        Return the strategy to use for processing binding errors.
      • setValidator

        public final void setValidator(@Nullable
                                       Validator validator)
        Set the Validator to apply after each binding step.
      • getValidator

        @Nullable
        public final Validator getValidator()
        Return the Validator to apply after each binding step, if any.
      • setConversionService

        public final void setConversionService(@Nullable
                                               ConversionService conversionService)
        Specify a ConversionService which will apply to every DataBinder.
        Since:
        3.0
      • getConversionService

        @Nullable
        public final ConversionService getConversionService()
        Return the ConversionService which will apply to every DataBinder.
      • setPropertyEditorRegistrar

        public final void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)
        Specify a single PropertyEditorRegistrar to be applied to every DataBinder.
      • setPropertyEditorRegistrars

        public final void setPropertyEditorRegistrars(@Nullable
                                                      PropertyEditorRegistrar[] propertyEditorRegistrars)
        Specify multiple PropertyEditorRegistrars to be applied to every DataBinder.
      • getPropertyEditorRegistrars

        @Nullable
        public final PropertyEditorRegistrar[] getPropertyEditorRegistrars()
        Return the PropertyEditorRegistrars to be applied to every DataBinder.