Interface BindInitializer

Deprecated. since Spring 1.2.7: prefer direct ServletRequestDataBinder usage, potentially in combination with a PropertyEditorRegistrar

public interface BindInitializer

Callback that allows for initialization of a binder with custom editors before kicking off the binding process.

This is effectively a way to factor binder initialization out into a dedicated object, to be invoked through BindUtils. In all other respects, it is equivalent to the initBinder template method defined by the BaseCommandController class.

Jean-Pierre Pawlak
See Also:
ServletRequestDataBinder, PropertyEditorRegistrar

Method Summary
 void initBinder(ServletRequest request, ServletRequestDataBinder binder)
          Deprecated. Initialize the given binder instance, e.g. with custom editors.

Method Detail


void initBinder(ServletRequest request,
                ServletRequestDataBinder binder)
                throws ServletException
Initialize the given binder instance, e.g. with custom editors. Called by BindUtils.bind.

This method allows you to register custom editors for certain fields of your command class. For instance, you will be able to transform Date objects into a String pattern and back, in order to allow your JavaBeans to have Date properties and still be able to set and display them in, for instance, an HTML interface.

request - current request
binder - new binder instance
ServletException - in case of invalid state or arguments
See Also:
DataBinder.registerCustomEditor(java.lang.Class, java.beans.PropertyEditor)

Copyright (c) 2002-2007 The Spring Framework Project.