Example usage for com.google.gwt.query.client GQuery change

List of usage examples for com.google.gwt.query.client GQuery change

Introduction

In this page you can find the example usage for com.google.gwt.query.client GQuery change.

Prototype

public GQuery change(Function... f) 

Source Link

Document

Bind a set of functions to the change event of each matched element.

Usage

From source file:org.bonitasoft.web.toolkit.client.ui.component.table.Table.java

License:Open Source License

private void addChangeEventHandler(GQuery checkboxes) {
    checkboxes.each(new Function() {

        @Override/*from  w  w w .  java 2s . c o m*/
        public void f(final Element k) {
            final GQuery checkbox = $(k);
            checkbox.change(new Function() {

                @Override
                public boolean f(Event e) {
                    processEvent($(e));
                    return true;
                }
            });

            // fix click propagation to line
            checkbox.click(new Function() {

                @Override
                public boolean f(final Event e) {
                    e.stopPropagation();
                    checkbox.trigger(Event.ONCHANGE);
                    return true;
                }
            });

        }
    });
}