Package com.vaadin.flow.component
Annotation Type DomEvent
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Inherited public @interface DomEvent
Maps a DOM event to aComponentEvent.Marking a
ComponentEventclass with @DomEventwill cause theComponentEventto be fired whenever the DOM event occurs.A
ComponentEventclass mapped with @DomEventmust have a special constructor which is invoked by the framework when creating and firing aComponentEventbased on a DOM event.- The first parameter must be the event source, a
Component. - The second parameter must be a boolean, indicating whether the event originated from the client (always true when fired based on a DOM event)
- Any additional parameters must be annotated using @
EventData, telling the framework which part of the DOM event data object to map to the parameter.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
EventData,Element.addEventListener(String, DomEventListener)
- The first parameter must be the event source, a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description DisabledUpdateModeallowUpdatesControls RPC for the listener when the element is disabled.DebounceSettingsdebounceThe debounce settings to use with this event.StringfilterThe filter expression to run in the browser to determine whether fired events should be passed to the server.
-
-
-
Element Detail
-
value
String value
The name of the DOM event which should fire the annotated component event.- Returns:
- the name of the DOM event
-
-
-
allowUpdates
DisabledUpdateMode allowUpdates
Controls RPC for the listener when the element is disabled.- Returns:
- the property update mode for disabled element
- See Also:
DomListenerRegistration.setDisabledUpdateMode(DisabledUpdateMode)
- Default:
- com.vaadin.flow.dom.DisabledUpdateMode.ONLY_WHEN_ENABLED
-
-
-
filter
String filter
The filter expression to run in the browser to determine whether fired events should be passed to the server.- Returns:
- the filter expression to use, or empty string to not use any filtering
- See Also:
DomListenerRegistration.setFilter(String)
- Default:
- ""
-
-
-
debounce
DebounceSettings debounce
The debounce settings to use with this event. By default, debounce is not used.- Returns:
- the debounce settings
- See Also:
DomListenerRegistration.debounce(int, com.vaadin.flow.dom.DebouncePhase, com.vaadin.flow.dom.DebouncePhase...)
- Default:
- @com.vaadin.flow.component.DebounceSettings(timeout=0, phases={com.vaadin.flow.dom.DebouncePhase.LEADING})
-
-