Errai 3.0.1-SNAPSHOT

org.jboss.errai.databinding.client
Interface HasPropertyChangeHandlers

All Known Implementing Classes:
BindableProxyAgent, DataBinder

public interface HasPropertyChangeHandlers

Implementations are a source of PropertyChangeEvents.

Author:
David Cracauer , Christian Sadilek

Method Summary
 void addPropertyChangeHandler(PropertyChangeHandler<?> handler)
          Adds a PropertyChangeHandler that will be notified when any property of the underlying object changes.
<T> void
addPropertyChangeHandler(String property, PropertyChangeHandler<T> handler)
          Adds a PropertyChangeHandler that will be notified when the given property of the underlying object changes.
 void removePropertyChangeHandler(PropertyChangeHandler<?> handler)
          Removes a PropertyChangeHandler, previously registered by a call to addPropertyChangeHandler(PropertyChangeHandler).
 void removePropertyChangeHandler(String property, PropertyChangeHandler<?> handler)
          Removes a PropertyChangeHandler, previously registered by a call to addPropertyChangeHandler(String, PropertyChangeHandler) for the same property name.
 

Method Detail

addPropertyChangeHandler

void addPropertyChangeHandler(PropertyChangeHandler<?> handler)
Adds a PropertyChangeHandler that will be notified when any property of the underlying object changes. Multiple handlers can be registered. If the same handler instance is passed multiple times, it will be notified multiple times.

Parameters:
handler - The PropertyChangeHandler instance, must not be null.

removePropertyChangeHandler

void removePropertyChangeHandler(PropertyChangeHandler<?> handler)
Removes a PropertyChangeHandler, previously registered by a call to addPropertyChangeHandler(PropertyChangeHandler). If the handler was added more than once to the same event source, it will be notified one less time after being removed. If the provided handler is null, or was never added, no exception is thrown and no action is taken.

Parameters:
handler - the PropertyChangeHandler instance

addPropertyChangeHandler

<T> void addPropertyChangeHandler(String property,
                                  PropertyChangeHandler<T> handler)
Adds a PropertyChangeHandler that will be notified when the given property of the underlying object changes. Multiple handlers can be registered. If the same handler instance is passed multiple times, it will be notified multiple times.

Parameters:
property - The name of the property or a property chain (e.g. customer.address.street) to receive events for. A property expression can end in a wildcard to indicate that changes of any property of the corresponding bean should be observed (e.g customer.address.*). A double wildcard can be used at the end of a property expression to register a cascading change handler for any nested property (e.g customer.**). Must not be null.
handler - The PropertyChangeHandler instance that should receive the events. Must not be null.

removePropertyChangeHandler

void removePropertyChangeHandler(String property,
                                 PropertyChangeHandler<?> handler)
Removes a PropertyChangeHandler, previously registered by a call to addPropertyChangeHandler(String, PropertyChangeHandler) for the same property name. If the handler was added more than once to the same event source and property name, it will be notified one less time after being removed. If the provided handler is null, or was never added for the given property, no exception is thrown and no action is taken.

Parameters:
property - The name of the property or a property chain expression (e.g. customer.address.street). Must not be null.
handler - the PropertyChangeHandler instance

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.