com.vaadin.flow.internal.nodefeature.

Class AttachExistingElementFeature

All Implemented Interfaces:

Serializable

public class AttachExistingElementFeature extends ServerSideFeature

Temporary storage of data required to handle existing element attachment callback from the client side.

The data is going to be destroyed once the response from the client side is received.

For internal use only. May be renamed or removed in a future release.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Constructor Details

    • AttachExistingElementFeature

      public AttachExistingElementFeature(StateNode node)

      Creates a new instance for the given node.

      Parameters:

      node - the node that the feature belongs to

  • Method Details

    • register

      public void register(Node<?> parent, Element previousSibling, StateNode child, ChildElementConsumer callback)

      Registers the data for the child node requested as being attached to an existing element.

      Parameters:

      parent - parent node of the child

      previousSibling - previous sibling for the requested existing element

      child - the state node that is going to be associated with the existing element

      callback - the callback to report the result

    • getCallback

      public ChildElementConsumer getCallback(StateNode node)

      Gets callback of the registered node.

      Parameters:

      node - the registered state node

      Returns:

      the registered callback for the node

    • getParent

      public Node<?> getParent(StateNode node)

      Gets parent Node of the registered node.

      Parameters:

      node - the registered state node

      Returns:

      the registered parent for the node

    • getPreviousSibling

      public Element getPreviousSibling(StateNode node)

      Gets previous sibling of the registered node.

      Parameters:

      node - the registered state node

      Returns:

      the registered previous sibling for the node

    • unregister

      public void unregister(StateNode node)

      Unregister the node and clean up all associated data.

      Parameters:

      node - the registered state node

    • forEachChild

      public void forEachChild(Consumer<StateNode> action)

      Description copied from class: NodeFeature

      Passes each child node instance to the given consumer.

      Overrides:

      forEachChild in class ServerSideFeature

      Parameters:

      action - the consumer that accepts each child