Package com.vaadin.flow.component
Annotation Type EventData
-
@Retention(RUNTIME) @Target(PARAMETER) @Documented public @interface EventData
Maps data from a DOM event to aComponentEvent.This annotation should be added to parameters in the DOM event constructor in a
ComponentEvent, mapped using @DomEvent. See the @DomEventdocumentation for more information.The annotation
value()will be evaluated as JavaScript when the event is handled in the browser. The expression is evaluated in a context whereelementrefers to the element for which the listener is registered andeventrefers to the fired event. The value of the expression is passed back to the server and injected into the annotatedComponentEventconstructor parameter.Supported parameter types are
String,JsonValue,Integer,Double,Booleanand their respective primitive types.- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
DomEvent,DomListenerRegistration.addEventData(String)
-
-
Element Detail
-
value
String value
A JavaScript expression that will be evaluated to collect data when an event is handled.- Returns:
- the expression to use for fetching event data
- See Also:
DomListenerRegistration.addEventData(String)
-
-