Constructor
new VisitContext(params)
A visit context object to direct tree visitation.
Parameter properties:
- amxNodes
- An array of AMX nodes to visit
Parameters:
Name | Type | Description |
---|---|---|
params |
{amxNodes: Array.<adf.mf.api.amx.AmxNode>, data: Object} | An object containing key/value pairs to populate the visit context. If the "data" object is passed, it may be retrieved in the callback via the "data" field value. |
Methods
-
getChildrenToWalk(parentNode) → {Array.<adf.mf.api.amx.AmxNode>|null}
-
Convenience function to determine what child AMX nodes, including facets, if any, should be walked of the given parent AMX node. Allows for type handlers to optimize how to walk the children if not all are being walked.
Parameters:
Name Type Description parentNode
adf.mf.api.amx.AmxNode the parent node Returns:
array of the children to walk, may be empty. returns null if all the children should be visited (isVisitAll is true)- Type
- Array.<adf.mf.api.amx.AmxNode> | null
-
getNodesToVisit() → {Array.<adf.mf.api.amx.AmxNode>}
-
Get the list of nodes to visit.
Returns:
array of nodes that should be visited.- Type
- Array.<adf.mf.api.amx.AmxNode>
-
getNodesToWalk() → {Array.<adf.mf.api.amx.AmxNode>}
-
Get the nodes that should be walked during visitation. This list does not necessarily include the nodes that should be visited (callback invoked).
Returns:
array of nodes that should be walked.- Type
- Array.<adf.mf.api.amx.AmxNode>
-
isVisitAll() → {boolean}
-
Get if all nodes should be visited.
Returns:
true if all nodes should be visited- Type
- boolean