DataBindingListener (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.grails.databinding.events
[Java] Interface DataBindingListener

    public interface DataBindingListener

A listener which will be notified of events generated during data binding.

Authors:
  Jeff Brown

See Also:
  DataBindingListenerAdapter

Since:
  2.3

Method Summary
`void` | `afterBinding(java.lang.Object target, java.lang.String propertyName, java.lang.Object errors)` Called after data binding has been imposed on a property
`void` | `afterBinding(java.lang.Object target, java.lang.Object errors)` Called after data binding has finished.
`java.lang.Boolean` | `beforeBinding(java.lang.Object target, java.lang.Object errors)` Called when data binding is about to start.
`java.lang.Boolean` | `beforeBinding(java.lang.Object target, java.lang.String propertyName, java.lang.Object value, java.lang.Object errors)` Called when data binding is about to imposed on a property
`void` | `bindingError(BindingError error, java.lang.Object errors)` Called when an error occurs binding to a property
`boolean` | `supports(java.lang.Class clazz)` @return true if the listener is interested in events for the specified type.

Method Detail

### afterBinding

    public void afterBinding(java.lang.Object target, java.lang.String propertyName, java.lang.Object errors)

  Called after data binding has been imposed on a property
  Parameters:
    `target` - The object data binding is being imposed upon
    `propertyName` - The name of the property that was bound to
    `errors` - the Spring Errors instance (a org.springframework.validation.BindingResult)

### afterBinding

    public void afterBinding(java.lang.Object target, java.lang.Object errors)

  Called after data binding has finished.
  Parameters:
    `target` - The object data binding is being imposed upon
    `errors` - the Spring Errors instance (a org.springframework.validation.BindingResult)

### beforeBinding

    public java.lang.Boolean beforeBinding(java.lang.Object target, java.lang.Object errors)

  Called when data binding is about to start.
  Parameters:
    `target` - The object data binding is being imposed upon
    `errors` - the Spring Errors instance (a org.springframework.validation.BindingResult)
  Returns:
    true if data binding should continue

### beforeBinding

    public java.lang.Boolean beforeBinding(java.lang.Object target, java.lang.String propertyName, java.lang.Object value, java.lang.Object errors)

  Called when data binding is about to imposed on a property
  Parameters:
    `target` - The object data binding is being imposed upon
    `propertyName` - The name of the property being bound to
    `value` - The value of the property being bound
    `errors` - the Spring Errors instance (a org.springframework.validation.BindingResult)
  Returns:
    true if data binding should continue, otherwise return false

### bindingError

    public void bindingError(BindingError error, java.lang.Object errors)

  Called when an error occurs binding to a property
  Parameters:
    `error` - encapsulates information about the binding error
    `errors` - the Spring Errors instance (a org.springframework.validation.BindingResult)
  See Also:
    BindingError

### supports

    public boolean supports(java.lang.Class clazz)

  Returns:
    true if the listener is interested in events for the specified type.

Groovy Documentation