Common Handlers

AttachEvent

com.vaadin.flow.component.AttachEvent is sent after the component is attached to the UI.

BlurEvent

com.vaadin.flow.component.BlurNotifier.BlurEvent corresponds to the blur DOM event.

ComponentValueChangeEvent

com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent is sent when the component’s value changes.

CompositionEndEvent

com.vaadin.flow.component.CompositionEndEvent is sent when a composition is ended. Corresponds to the compositionend DOM event.

CompositionStartEvent

com.vaadin.flow.component.CompositionStartEvent is sent when a composition is started. Corresponds to the compositionstart DOM event.

CompositionUpdateEvent

com.vaadin.flow.component.CompositionUpdateEvent is sent when a composition is updated. Corresponds to the compositionupdate DOM event.

DetachEvent

com.vaadin.flow.component.DetachEvent is sent before the component is detached from the UI.

FocusEvent

com.vaadin.flow.component.FocusNotifier.FocusEvent corresponds to the focus DOM event.

InputEvent

com.vaadin.flow.component.InputEvent fired when the component has received any type of input (for example, click, key press).

This event is specifically intended to the used for the input event in the DOM API.

KeyDownEvent

com.vaadin.flow.component.KeyDownEvent is sent when a key is pressed. Corresponds to the keydown DOM event.

KeyPressEvent

com.vaadin.flow.component.KeyPressEvent is sent when a key is pressed. Corresponds to the keypress DOM event.

KeyUpEvent

com.vaadin.flow.component.KeyUpEvent is sent when a key is released. Corresponds to the keyup DOM event.

TypedValueChangeEvent

io.jmix.flowui.component.SupportsTypedValue.TypedValueChangeEvent is sent when the user finished the manipulations with the component. For example, after the Enter press or when the component loses focus.

An event has the following methods:

  • getOldValue() returns the typed component’s value before the change.

  • getValue() returns the current typed component’s value.

@Autowired
protected Notifications notifications;

@Subscribe("nameField")
protected void onNameFieldTypedValueChange(SupportsTypedValue.TypedValueChangeEvent<TypedTextField<String>, String> event) {
    notifications
            .show("Before: " + event.getOldValue() +
                    ". After: " + event.getValue());
}