public class AttachExistingElementFeature extends ServerSideFeature
The data is going to be destroyed once the response from the client side is received.
| 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, generateChangesFromEmptyallowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetachpublic 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 childpreviousSibling - 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 nodenodepublic Node<?> getParent(StateNode node)
Node of the registered node.node - the registered state nodenodepublic Element getPreviousSibling(StateNode node)
node.node - the registered state nodenodepublic void unregister(StateNode node)
node and clean up all associated data.node - the registered state nodepublic void forEachChild(Consumer<StateNode> action)
NodeFeatureforEachChild in class ServerSideFeatureaction - the consumer that accepts each childCopyright © 2018. All rights reserved.