Class WebComponentUI.WebComponentConnectEvent

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