Class WebComponentUI.WebComponentConnectEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.component.ComponentEvent<UI>
-
- com.vaadin.flow.component.webcomponent.WebComponentUI.WebComponentConnectEvent
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- WebComponentUI
@DomEvent("connect-web-component") public static class WebComponentUI.WebComponentConnectEvent extends ComponentEvent<UI>
Event used for sending the activation event for an exported web component from the client to the server.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description WebComponentConnectEvent​(UI source, boolean fromClient, String tag, String webComponentElementId, String userAssignedId, elemental.json.JsonObject attributeValues)
Creates a new web component connection event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description elemental.json.JsonObject
getAttributeJson()
Gets the initial attribute values.String
getTag()
Gets the tag of the element to connect.String
getWebComponentElementId()
Gets the id of the web component.String
getWebComponentUserAssignedId()
Gets the user-assigned id of the web component.-
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Constructor Detail
-
WebComponentConnectEvent
public WebComponentConnectEvent​(UI source, boolean fromClient, @EventData("tag") String tag, @EventData("id") String webComponentElementId, @EventData("userAssignedId") String userAssignedId, @EventData("attributeValues") elemental.json.JsonObject attributeValues)
Creates a new web component connection event.- Parameters:
source
- the component that was attachedfromClient
-true
if the event was originally fired on the client,false
if the event originates from server-side logictag
- the tag of the element to connectwebComponentElementId
- the id of the embedded web componentuserAssignedId
- the id user might have set on the embedding web component elementattributeValues
- initial attribute values as a JsonObject. If present, these will override the default value designated by theWebComponentExporter
but only for this instance.
-
-
Method Detail
-
getTag
public String getTag()
Gets the tag of the element to connect.- Returns:
- the tag of the element
-
getWebComponentElementId
public String getWebComponentElementId()
Gets the id of the web component.- Returns:
- the id of the web component
-
getWebComponentUserAssignedId
public String getWebComponentUserAssignedId()
Gets the user-assigned id of the web component.- Returns:
- user-assigned id
-
getAttributeJson
public elemental.json.JsonObject getAttributeJson()
Gets the initial attribute values.- Returns:
- the initial attribute values
-
-