Example usage for com.vaadin.event MethodEventSource removeListener

List of usage examples for com.vaadin.event MethodEventSource removeListener

Introduction

In this page you can find the example usage for com.vaadin.event MethodEventSource removeListener.

Prototype

@Deprecated
public void removeListener(Class<?> eventType, Object target, String methodName);

Source Link

Document

Removes one registered listener method.

Usage

From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.ComponentListenerUtil.java

License:Open Source License

/**
 * @param widget/*from  w w  w .j a va 2 s.  c  o m*/
 * @param event
 * @param listener
 */
public static void asyncRemoveListener(final MethodEventSource widget,
        final Class<? extends Component.Event> event, final Component.Listener listener,
        Method listenerMethod) {
    if (widget == null) {
        return;
    }

    UI ui = UI.getCurrent();
    if (ui != null) {
        widget.removeListener(event, listener, listenerMethod);
    } else {
        throw new IllegalStateException("Not a valid web transaction");
    }
}