Class ElementListenerMap
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeMap
com.vaadin.flow.internal.nodefeature.ElementListenerMap
- All Implemented Interfaces:
Serializable
Map of DOM events with server-side listeners. The key set of this map
describes the event types for which listeners are present. The values
associated with the keys are currently not used.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionElementListenerMap
(StateNode node) Creates a new element listener map for the given node. -
Method Summary
Modifier and TypeMethodDescriptionadd
(String eventType, DomEventListener listener) Add eventData for an event type.void
Fires an event to all listeners registered for the given type.getExpressions
(String eventName) Gets the event data expressions defined for the given event name.getPropertySynchronizationMode
(String propertyName) Gets the most permissive update mode for any event registration that is configured to synchronize the given property.Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeMap
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, producePutChange, put, put, remove, updateFromClient
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
Field Details
-
ALWAYS_TRUE_FILTER
Dummy filter string that always passes.- See Also:
-
-
Constructor Details
-
ElementListenerMap
Creates a new element listener map for the given node.- Parameters:
node
- the node that the map belongs to
-
-
Method Details
-
add
Add eventData for an event type.- Parameters:
eventType
- the event typelistener
- the listener to add- Returns:
- a handle for configuring and removing the listener
-
fireEvent
Fires an event to all listeners registered for the given type.- Parameters:
event
- the event to fire
-
getExpressions
Gets the event data expressions defined for the given event name. This method is currently only provided to facilitate unit testing.- Parameters:
eventName
- the name of the event, notnull
- Returns:
- an unmodifiable set of event data expressions, not
null
-
getPropertySynchronizationMode
Gets the most permissive update mode for any event registration that is configured to synchronize the given property.- Parameters:
propertyName
- the property name to check, notnull
- Returns:
- the most permissive update mode, or
null
if synchronization is not configured for the given property
-