Package com.vaadin.client.flow.binding
Class ServerEventHandlerBinder
java.lang.Object
com.vaadin.client.flow.binding.ServerEventHandlerBinder
Binds and updates server object able to send notifications to the server.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic elemental.events.EventRemoverbindServerEventHandlerNames(elemental.dom.Element element, StateNode node) Registers all the server event handler names found in theNodeFeatures.CLIENT_DELEGATE_HANDLERSfeature in the state node asserverObject.<methodName>.static elemental.events.EventRemoverbindServerEventHandlerNames(Supplier<ServerEventObject> objectProvider, StateNode node, int featureId, boolean returnValue) Registers all the server event handler names found in the feature with thefeatureIdin theServerEventObjectobject.
-
Method Details
-
bindServerEventHandlerNames
public static elemental.events.EventRemover bindServerEventHandlerNames(elemental.dom.Element element, StateNode node) Registers all the server event handler names found in theNodeFeatures.CLIENT_DELEGATE_HANDLERSfeature in the state node asserverObject.<methodName>. Additionally listens to changes in the feature and updates$serveraccordingly.- Parameters:
element- the element to updatenode- the state node containing the feature- Returns:
- a handle which can be used to remove the listener for the feature
-
bindServerEventHandlerNames
public static elemental.events.EventRemover bindServerEventHandlerNames(Supplier<ServerEventObject> objectProvider, StateNode node, int featureId, boolean returnValue) Registers all the server event handler names found in the feature with thefeatureIdin theServerEventObjectobject. Additionally listens to changes in the feature and updates server event object accordingly.- Parameters:
objectProvider- the provider of the event object to updatenode- the state node containing the featurefeatureId- the feature id which contains event handler methodsreturnValue-trueif the handler should return a promise that will reflect the server-side result;falseto not return any value- Returns:
- a handle which can be used to remove the listener for the feature
-