You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.webcomponent.

Class WebComponentWrapper

    • Constructor Detail

      • 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 Detail

      • 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.