Class ServerEventHandlerBinder

java.lang.Object
com.vaadin.client.flow.binding.ServerEventHandlerBinder

public class ServerEventHandlerBinder extends Object
Binds and updates server object able to send notifications to the server.
Since:
1.0
Author:
Vaadin Ltd
  • Method Details

    • bindServerEventHandlerNames

      public static elemental.events.EventRemover bindServerEventHandlerNames(elemental.dom.Element element, StateNode node)
      Registers all the server event handler names found in the NodeFeatures.CLIENT_DELEGATE_HANDLERS feature in the state node as serverObject.<methodName>. Additionally listens to changes in the feature and updates $server accordingly.
      Parameters:
      element - the element to update
      node - 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 the featureId in the ServerEventObject object. Additionally listens to changes in the feature and updates server event object accordingly.
      Parameters:
      objectProvider - the provider of the event object to update
      node - the state node containing the feature
      featureId - the feature id which contains event handler methods
      returnValue - true if the handler should return a promise that will reflect the server-side result; false to not return any value
      Returns:
      a handle which can be used to remove the listener for the feature