com.vaadin.flow.component.
Annotation Interface DomEvent
Maps a DOM event to a ComponentEvent
.
Marking a ComponentEvent
class with @DomEvent
will cause the
ComponentEvent
to be fired whenever the DOM event occurs.
A ComponentEvent
class mapped with @DomEvent
must have a
special constructor which is invoked by the framework when creating and
firing a ComponentEvent
based 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:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionControls RPC for the listener when the element is disabled.
The debounce settings to use with this event.
The filter expression to run in the browser to determine whether fired events should be passed to the server.
boolean
Controls if the browser is asked to prevent the default browser behavior.
boolean
Controls if the event is let to propagate to parent elements.
-
Element Details
-
value
String valueThe name of the DOM event which should fire the annotated component event.
Returns:
the name of the DOM event
-
-
-
allowUpdates
DisabledUpdateMode allowUpdatesControls RPC for the listener when the element is disabled.
Returns:
the property update mode for disabled element
See Also:
Default:
ONLY_WHEN_ENABLED
-
filter
String filterThe 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:
Default:
""
-
debounce
DebounceSettings debounceThe debounce settings to use with this event. By default, debounce is not used.
Returns:
the debounce settings
See Also:
Default:
@com.vaadin.flow.component.DebounceSettings(timeout=0, phases={LEADING})
-
stopPropagation
boolean stopPropagationControls if the event is let to propagate to parent elements.
Returns:
true if the event is not let to propagate to parent elements
Default:
false
-
preventDefault
boolean preventDefaultControls if the browser is asked to prevent the default browser behavior.
Returns:
true if default behavior is should be prevented
Default:
false
-