public class AttachExistingElementFeature extends ServerSideFeature
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.
Constructor and Description |
---|
AttachExistingElementFeature(StateNode node)
Creates a new instance for the given node.
|
Modifier and Type | Method and Description |
---|---|
void |
forEachChild(Consumer<StateNode> action)
Passes each child node instance to the given consumer.
|
ChildElementConsumer |
getCallback(StateNode node)
Gets callback of the registered
node . |
Node<?> |
getParent(StateNode node)
Gets parent
Node of the registered node . |
Element |
getPreviousSibling(StateNode node)
Gets previous sibling of the registered
node . |
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. |
void |
unregister(StateNode node)
Unregister the
node and clean up all associated data. |
collectChanges, generateChangesFromEmpty
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
public AttachExistingElementFeature(StateNode node)
node
- the node that the feature belongs topublic void register(Node<?> parent, Element previousSibling, StateNode child, ChildElementConsumer callback)
child
node requested as being attached
to an existing element.parent
- parent node of the child
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 resultpublic ChildElementConsumer getCallback(StateNode node)
node
.node
- the registered state nodenode
public Node<?> getParent(StateNode node)
Node
of the registered node
.node
- the registered state nodenode
public Element getPreviousSibling(StateNode node)
node
.node
- the registered state nodenode
public void unregister(StateNode node)
node
and clean up all associated data.node
- the registered state nodepublic void forEachChild(Consumer<StateNode> action)
NodeFeature
forEachChild
in class ServerSideFeature
action
- the consumer that accepts each childCopyright © 2025. All rights reserved.