Show TOC

Function documentationgetCurrentNavigationSubTreeFromLevel Method Locate this document in the navigation structure

 

getCurrentNavigationSubTreeFromLevel(level, callback, argument)

Returns the child nodes of the node at the specified level in the currently selected path.

For example, in the following navigation hierarchy, specifying level 1 would return nodes C and D, as shown below.

This graphic is explained in the accompanying text.

Use this method to obtain nodes for a detailed navigation iView.

Parameters

level

In the selected path, the level of the node whose child nodes are to be returned. The top-level node in the selected path is at level 0.

callback

A callback function to return the results. The callback function receives the following parameters:

  • nodes: an array of NavigationNode objects representing the children of the specified node in the selected path

  • argument (see below)

argument (optional)

Any JavaScript object. The object is passed to the callback function.

Return Value

None; the result is returned asynchronously through the callback function.

Example

This method is usually called first in the DOM building process to deliver an array of nodes to be displayed at the top level of navigation, for example, during initial rendering of the navigation tree.

Example Example

  1. EPCM.getSAPTop().LSAPI.AFPPlugin.model.getCurrentNavigationSubTreeFromLevel(startFromLevel,drawNavigationMenu, {currentNode:currentNode, currentLevel: NM_START_FROM_LEVEL, prefixName: ""});
End of the code.
  • drawNavigationMenu(nodes, args) – a callback function

  • {currentNode:currentNode, currentLevel: NM_START_FROM_LEVEL, prefixName: ""} – specifies the current node and the current level to pass to the callback function. prefixNameis used to identify the nodes of the navigation tree during the DOM building.