The Spring Framework

org.springframework.web.bind.annotation
Annotation Type InitBinder


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface InitBinder

Annotation that identifies methods which initialize the WebDataBinder which will be used for populating command and form object arguments of annotated handler methods.

Such init-binder methods support all arguments that RequestMapping supports, except for command/form objects and corresponding validation result objects. Init-binder methods must not have a return value; they are usually declared as void.

Typical arguments are WebDataBinder in combination with WebRequest or Locale, allowing to register context-specific editors.

Since:
2.5
Author:
Juergen Hoeller
See Also:
WebDataBinder, WebRequest

Optional Element Summary
 String[] value
          The names of command/form attributes that this init-binder method is supposed to apply to.
 

value

public abstract String[] value
The names of command/form attributes that this init-binder method is supposed to apply to.

Default is to apply to all command/form attributes used by the annotated handler class. Specifying model attribute names here restricts the init-binder method to those specific model attributes, with different init-binder methods applying to different attributes.

Default:
{}

The Spring Framework

Copyright © 2002-2007 The Spring Framework.