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:
  • Constructor Details

    • 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 attached
      fromClient - true if the event was originally fired on the client, false if the event originates from server-side logic
      tag - the tag of the element to connect
      webComponentElementId - the id of the embedded web component
      userAssignedId - the id user might have set on the embedding web component element
      attributeValues - initial attribute values as a JsonObject. If present, these will override the default value designated by the WebComponentExporter but only for this instance.
  • Method Details

    • 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