Class WebComponentWrapper

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.webcomponent.WebComponentWrapper
All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasStyle, Serializable

public class WebComponentWrapper extends Component
Wrapper component for a web component that exposes ClientCallable methods that the client-side components expect to be available.

For internal use only. May be renamed or removed in a future release.

Since:
2.0
Author:
Vaadin Ltd.
See Also:
  • Constructor Details

    • WebComponentWrapper

      public WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding)
      Wrapper class for the server side WebComponent.
      Parameters:
      rootElement - Element to which the WebComponentWrapper is bound to.
      binding - binding that offers methods for delivering property updates to the component being wrapped by WebComponentWrapper
    • WebComponentWrapper

      protected WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding, List<Element> bootstrapElements)
      Wrapper class for the server side WebComponent.
      Parameters:
      rootElement - Element to which the WebComponentWrapper is bound to.
      binding - binding that offers methods for delivering property updates to the component being wrapped by WebComponentWrapper
      bootstrapElements - elements that should be added to the shadow dom of the rootElement. These are copies of the original elements and the copies are created by WebComponentConfigurationRegistry
  • Method Details

    • sync

      @ClientCallable public void sync(String property, elemental.json.JsonValue newValue)
      Synchronize method for client side to send property value updates to the server.
      Parameters:
      property - property name to update
      newValue - the new value to set
    • reconnect

      @ClientCallable public void reconnect()
      Cancel cleanup for a disconnected component.
    • disconnected

      @ClientCallable public void disconnected()
      A WebComponent disconnected from the dom will be scheduled for cleaning if it doesn't get reconnected before times up.