Show TOC Start of Content Area

Background documentation iterateInitialNavNodes  Locate the document in its SAP Library structure

Iterates through the top-level navigation nodes.

During each iteration of the tag, a different node is exposed in the body of the tag, either via a cooperating tag that accesses the current node in the iteration or the scriptlet variable defined by the currentNavNode attribute.

Attributes

Name

Mandatory

Description

currentNavNode

No

The name of the Java variable to create for holding the INavigationNode object for the current node in the iteration.

The variable is accessible in scriptlets in the body of the tag.

direction

No

Indicates in what direction to iterate. The attribute can have the following values:

     forward (default): Iterate from the first to the last node.

     backward: Iterate from the last to the first node.

Variables

Name

Scope

Description

<currentNavNode> attribute

Body of tag

INavigationNode object representing the current node in the iteration.

Example

The following iterates through all the top-level navigation nodes and creates a link for each one.

<nav:iterateInitialNavNodes>

    <nav:ifNavNodeInSelectedPath>

        <TD nowrap class="chosenTDLevel1">

            <nav:navNodeAnchor navigationMethod="byURL"
             anchorAttributes="class='chosenOnLevel1'"/>

        </TD>

        <% if(levels==2) { %>

            <nav:storeNavNode/>

        <% } %>

    </nav:ifNavNodeInSelectedPath>

    <nav:ifNotNavNodeInSelectedPath>

        <TD nowrap class="unChosenTDLevel1">

            <nav:navNodeAnchor navigationMethod="byURL"
             anchorAttributes="class='unChosenOnLevel1'"/>

        </TD>

    </nav:ifNotNavNodeInSelectedPath>

</nav:iterateInitialNavNodes>

 

End of Content Area