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

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

Introduction

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

Prototype

public GQuery click(Function... f) 

Source Link

Document

Bind a set of functions to the click 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//  w  ww.j  a va  2  s .co  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;
                }
            });

        }
    });
}