Example usage for com.vaadin.ui AbstractComponent addListener

List of usage examples for com.vaadin.ui AbstractComponent addListener

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractComponent addListener.

Prototype

@Override
public Registration addListener(Class<?> eventType, Object target, Method method) 

Source Link

Document

Registers a new listener with the specified activation method to listen events generated by this component.

Usage

From source file:com.expressui.core.view.field.FormField.java

License:Open Source License

/**
 * Adds listener for changes in this field's value.
 *
 * @param target     target object to invoke
 * @param methodName name of method to invoke
 *///  w  ww  .  j a v  a 2 s . c om
public void addValueChangeListener(Object target, String methodName) {
    AbstractComponent component = (AbstractComponent) getField();
    component.addListener(Property.ValueChangeEvent.class, target, methodName);
}