topLevelNodes
A standard JavaScript Array containing an ordered list of node ids to display in this navigationsection. To display a navigation node, it or one of its ancestors must have its
id
in the list of
topLevelNodes
for one of the navigation areas. The navigation areas are named
menuA
,
menuB
,and
trayA
.
trayA
A
navBuilder
object containing data for the tray-based navigation section on the left side of the window. It is used in the
Trays
layout. To make a node visible at the top level here, add it to themain
navBuilder
object. It or one of its ancestors must also have its
id
in
trayA.topLevelNodes
.
xmlDocument
The full XML Document object for this
navBuilder
object. It contains all
collection
and
item
nodes. This is initially empty for the
menuA
and
trayA
navigation areas. The nodes are copiedinto navigation areas from the main
navBuilder
object just prior to display.
xmlNodeMap
An Array of node
ids
and
nodePointer
objects, which contain information about the node’slocations. It helps to find nodes more quickly. The value
nodePointer.location
is a string suchas “0.1.2”, which means that the node is the third child, of the second child, of the first child, of the
xmlRoot
object.
xmlRoot
The
documentElement
node for the
xmlDocument
object.
navBuilder Methods
addChildNodeTo(parentId, nodeType [, attribute1, attribute2, ...])
Constructs a new node and adds it as a child to an existing
collection
node with an
id
equalto
parentId
. The
nodeType
is the type of the node: either
collection
or an
item
. After this, thefunction can take an arbitrarily long list of attribute strings in the form of
id==NEW_NODE_ID
.The
id
attribute must be specified; all others are optional.
addPrevSiblingNodeTo(siblingId, nodeType [, attributes])
Constructs a new node, and add it as the previous sibling to an existing node. This function issimilar to
addChildNodeTo
, except that it adds the new node as a sibling, not a child.
addTopLevelNode(nodeId [, beforeNodeId])
Adds a
nodeId
to the list of node ids in
topLevelNodes
for a specific navigation area. It forcesthe node to be drawn as a top-level menu item. If
beforeNodeId
is specified, it inserts this nodebefore the node with that id. Otherwise, the node is added at the end. The
beforeNodeId
parameter is available only in version 7.5.
APPENDIX G
s
LAYOUT MANAGER API
413
Add a Comment