Show TOC

Background documentationrecurseNavNodeChildren Locate this document in the navigation structure

 

Iterates recursively through all the nodes below the current node, performing a depth-first pass through the navigation tree, starting with the current node.

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

depthLimit

No

The number of levels through which to iterate.

currentDepth

No

The name of the Java variable to create for holding the Byte object that equals the current depth within the recursive iteration.

The first level of the iteration equals 1.

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

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.

Variables

Name

Scope

Description

<currentNavNode> attribute

Body of tag

INavigationNode object representing the current node in the iteration.

<currentDepth> attribute

Body of tag

A Byte object representing the current depth within the recursive iteration.

Cooperating Tags

The tag must be nested in one of the following tags:

  • contextNavNode

  • iterateInitialNavNodes

  • iterateNavNodeChildren

  • iterateNavNodesInSelectedPath

  • iterateSelectedNavNodesLevel

  • launchedNavNode

  • navNode

  • navNodeParent

  • recallNavNode

  • recurseNavNodeChildren

  • selectedNavNode

Example

The following creates a detailed navigation iView and displays the navigation tree starting at a specified level. Only sublevels that are in the selected path are displayed.

The recurseNavNodeChildren tag starts a depth-first pass through all nodes below the current node. If a folder node is not in the selected path, its child nodes are not displayed. The doNotRecurseNavNodeChildren tag is used to skip passing through the child nodes of the current node and prevent these nodes from being displayed.

The current depth is used in the <li> tag to add the appropriate CSS class for that level.

Syntax Syntax

  1. <ul>
    <nav:iterateSelectedNavNodesLevel level="3">
        <nav:recurseNavNodeChildren currentDepth="theDepth">
            <li class="dtnLevel<%=theDepth.byteValue()%>">
            <nav:ifNavNodeInSelectedPath>
                <strong>
                    <nav:navNodeAnchor navigationMethod="byURL"/>
                </strong>
            </nav:ifNavNodeInSelectedPath>
    
            <nav:ifNotNavNodeInSelectedPath>
                <nav:navNodeAnchor navigationMethod="byURL"/>
                <nav:doNotRecurseNavNodeChildren/>
            </nav:ifNotNavNodeInSelectedPath>
    
            <nav:ifNextRecursionDepthWillNotChange>
                </li>
            </nav:ifNextRecursionDepthWillNotChange>
    
            <nav:ifNextRecursionDepthWillIncrease>
                <ul>
            </nav:ifNextRecursionDepthWillIncrease>
    
            <nav:ifNextRecursionDepthWillDecrease>
                </li>
                <nav:decreaseRecursionDepthLoop>
                    </ul></li>
                </nav:decreaseRecursionDepthLoop>
            </nav:ifNextRecursionDepthWillDecrease>
        </nav:recurseNavNodeChildren>
    </nav:iterateSelectedNavNodesLevel>
    </ul>
    
End of the code.