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 TypeMethodDescriptionvoidforEachChild(Consumer<StateNode> action) Passes each child node instance to the given consumer.getCallback(StateNode node) Gets callback of the registerednode.Node<?> Gets parentNodeof the registerednode.getPreviousSibling(StateNode node) Gets previous sibling of the registerednode.voidregister(Node<?> parent, Element previousSibling, StateNode child, ChildElementConsumer callback) Registers the data for thechildnode requested as being attached to an existing element.voidunregister(StateNode node) Unregister thenodeand clean up all associated data.Methods inherited from class com.vaadin.flow.internal.nodefeature.ServerSideFeature
collectChanges, generateChangesFromEmptyMethods 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 thechildnode requested as being attached to an existing element.- Parameters:
parent- parent node of thechildpreviousSibling- 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 parentNodeof 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 thenodeand clean up all associated data.- Parameters:
node- the registered state node
-
forEachChild
Description copied from class:NodeFeaturePasses each child node instance to the given consumer.- Overrides:
forEachChildin classServerSideFeature- Parameters:
action- the consumer that accepts each child
-