Class WebComponentWrapper
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.webcomponent.WebComponentWrapper
-
- All Implemented Interfaces:
AttachNotifier
,DetachNotifier
,HasElement
,Serializable
public class WebComponentWrapper extends Component
Wrapper component for a web component that exposesClientCallable
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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding)
Wrapper class for the server side WebComponent.protected
WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding, List<Element> bootstrapElements)
Wrapper class for the server side WebComponent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disconnected()
A WebComponent disconnected from the dom will be scheduled for cleaning if it doesn't get reconnected before times up.void
reconnect()
Cancel cleanup for a disconnected component.void
sync(String property, elemental.json.JsonValue newValue)
Synchronize method for client side to send property value updates to the server.-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
WebComponentWrapper
public WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding)
Wrapper class for the server side WebComponent.- Parameters:
rootElement
-Element
to which theWebComponentWrapper
is bound to.binding
- binding that offers methods for delivering property updates to thecomponent
being wrapped byWebComponentWrapper
-
WebComponentWrapper
protected WebComponentWrapper(Element rootElement, WebComponentBinding<?> binding, List<Element> bootstrapElements)
Wrapper class for the server side WebComponent.- Parameters:
rootElement
-Element
to which theWebComponentWrapper
is bound to.binding
- binding that offers methods for delivering property updates to thecomponent
being wrapped byWebComponentWrapper
bootstrapElements
- elements that should be added to the shadow dom of therootElement
. These are copies of the original elements and the copies are created byWebComponentConfigurationRegistry
-
-
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 updatenewValue
- 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.
-
-