Class AttachExistingElementFeature
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.ServerSideFeature
com.vaadin.flow.internal.nodefeature.AttachExistingElementFeature
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionCreates a new instance for the given node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
forEachChild
(Consumer<StateNode> action) Passes each child node instance to the given consumer.getCallback
(StateNode node) Gets callback of the registerednode
.Node<?>
Gets parentNode
of the registerednode
.getPreviousSibling
(StateNode node) Gets previous sibling of the registerednode
.void
register
(Node<?> parent, Element previousSibling, StateNode child, ChildElementConsumer callback) Registers the data for thechild
node requested as being attached to an existing element.void
unregister
(StateNode node) Unregister thenode
and clean up all associated data.Methods inherited from class com.vaadin.flow.internal.nodefeature.ServerSideFeature
collectChanges, generateChangesFromEmpty
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
Constructor Details
-
AttachExistingElementFeature
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 thechild
node requested as being attached to an existing element.- Parameters:
parent
- parent node of thechild
previousSibling
- previous sibling for the requested existing elementchild
- the state node that is going to be associated with the existing elementcallback
- the callback to report the result
-
getCallback
Gets callback of the registerednode
.- Parameters:
node
- the registered state node- Returns:
- the registered callback for the
node
-
getParent
Gets parentNode
of the registerednode
.- Parameters:
node
- the registered state node- Returns:
- the registered parent for the
node
-
getPreviousSibling
Gets previous sibling of the registerednode
.- Parameters:
node
- the registered state node- Returns:
- the registered previous sibling for the
node
-
unregister
Unregister thenode
and clean up all associated data.- Parameters:
node
- the registered state node
-
forEachChild
Description copied from class:NodeFeature
Passes each child node instance to the given consumer.- Overrides:
forEachChild
in classServerSideFeature
- Parameters:
action
- the consumer that accepts each child
-