Example usage for com.vaadin.shared EventId FOCUS

List of usage examples for com.vaadin.shared EventId FOCUS

Introduction

In this page you can find the example usage for com.vaadin.shared EventId FOCUS.

Prototype

String FOCUS

To view the source code for com.vaadin.shared EventId FOCUS.

Click Source Link

Usage

From source file:com.eternach.client.RichOptionGroupWidget.java

License:Apache License

@Override
public void onFocus(final FocusEvent arg0) {
    if (!blurOccured) {
        // no blur occured before this focus event
        // panel was blurred => fire the event to the server side if
        // requested by server side
        if (sendFocusEvents) {
            client.updateVariable(paintableId, EventId.FOCUS, "", true);
        }/*from   w ww.j a v a2 s .c o  m*/
    } else {
        // blur occured before this focus event
        // another control inside the panel (checkbox / radio box) was
        // blurred => do not fire the focus and set blurOccured to false, so
        // blur will not be fired, too
        blurOccured = false;
    }
}

From source file:org.vaadin.alump.ckeditor.client.VCKEditorTextField.java

License:Apache License

@Override
public void onFocus() {
    if (ckEditorIsReady) {
        if (clientToServer.hasEventListeners(this, EventId.FOCUS)) {
            clientToServer.updateVariable(paintableId, EventId.FOCUS, "", true);
        }/*from w  ww . j ava 2 s  .c  o  m*/
    }
}