Show TOC Start of Content Area

Background documentation Methods  Locate the document in its SAP Library structure

This section describes the methods provided by the navigation helper service.

Retrieving Nodes

The following methods enable you retrieve nodes in the navigation hierarchy based on the node selected by the user:

     getCurrentNavNode(): Returns the current node, that is, the current navigation target.

     getCurrentLaunchNavNode(): Returns the launched node, that is, the node that is displayed in the content area. If the current node is a folder or other non-launchable node, the first node in the level below is launched.

     getCurrentContextNavNode(): Returns the context node, that is, the node that is highlighted in the top-level or detailed navigation iView.

Generally, the context node is the same as the current node. But can be different if the current node is invisible, or if a different context node was specified in the navigation link.

The following methods enable you retrieve other nodes in the navigation hierarchy:

·        getPersonalizePortalNode(): Returns the initial node for portal personalization, which is the initial node with a merge ID of PORTAL_PERSONALIZATION.

·        getRealInitialNodes(): Returns the initial nodes, without the portal personalization node. The navigation service’s getInitialNodes() returns all the initial nodes.

·        getFirstNode(): Returns the first Navigation node in the highest level of the navigation hierarchy. If this is not launchable, the first node of the second level is returned.

·        getParentNode(): Returns the parent node of the specified node.

Retrieving the Navigation Path

The following methods enable you retrieve the nodes in the navigation path:

·        getNavNodesListForTarget(): Returns the navigation nodes from the specified node to its entry point. In other words, the method returns the nodes along the navigation path.

·        getNavNodesPathIndexesList(): Returns an array of integers that represent the navigation path.

For example, if the current context node is System Administration Support Support Desk, the method might return 3, 5, 0 – where 3 is the index of System Administration in the initial nodes, 5is the index of the Support node in the children of System Administration and so on.

The method can be helpful when creating a navigation iView. Once a navigation tree is rendered, you can then use the getNavNodesPathIndexesList() method to retrieve the indexes of the nodes to display, and update the navigation tree without creating the entire tree from scratch.

Parsing a Navigation Target

The following methods enable you get sections of a specific navigation target URL:

·        getInternalURL(): Returns the specified navigation target URL, without the prefix.

·        getPrefix():Returns the prefix of the specified navigation target URL.

 

 

End of Content Area