Repeatedly includes its body as many times as the recursion depth decreases, if the next node is on a higher level or if the overall recursion ends. This tag can be used to close HTML tags on the way back up in a nested tree structure.
Name |
Mandatory |
Description |
currentIndex |
No |
The name of a Java variable that holds the Byte object for the current loop index. The variable is accessible in scriptlets in the body of the tag. |
Name |
Scope |
Description |
currentIndex attribute |
Tag body |
A Byte object representing the current loop index |
The tag must be nested in the ifNextRecursionDepthWillDecrease
tag.
The following code displays a site map of all navigation nodes using the nested unordered lists for markup. The ifNextRecursionDepthWillDecrease tag closes the <li> tag belonging to the current node, and the <ul> and <li> tag of the current level and upper levels as many times as necessary, since either the next recursion pass continues with a sibling of the current node's ancestor node or the recursion ends after this node.
Syntax
<ul> <nav:iterateInitialNavNodes> <nav:recurseNavNodeChildren> <li> <nav:navNodeAnchor navigationMethod="byURL"/> <nav:ifNextRecursionDepthWillNotChange> </li> </nav:ifNextRecursionDepthWillNotChange> <nav:ifNextRecursionDepthWillIncrease> <ul> </nav:ifNextRecursionDepthWillIncrease> <nav:ifNextRecursionDepthWillDecrease> </li> <nav:decreaseRecursionDepthLoop> </ul></li> </nav:decreaseRecursionDepthLoop> </nav:ifNextRecursionDepthWillDecrease> </nav:recurseNavNodeChildren> </nav:iterateInitialNavNodes> </ul>