C H A P T E R  30

treeLevel


<jato:treeLevel>

Denotes an arbitratry JSP content section that will be rendered "level times" for matching node levels. There may be more than one treeLevel tag contained in a treeView tag. With each cycle of the TreeView traversal, any contained treeLevel tags are evaluated for a match with the current node depth level. If the treeLevel tag matches the current node depth level then the content of the tag is rendered a number of times equal to the current level.

A treeLevel tag is said to "match" the current level if all of the following is true (each comparison is considered true if the tag attribute is unspecified):

If the treeLevel tag matches the current tree depth level, then the body content will be processed a number of times equal to the current level, including any embedded JSP or JATO tags. For example, if the current node level is 4, then the body content of any matching treeLevel tags would be rendered 4 times for the current node. Typically, one uses treeLevel tags to provide level-specific indentation or other structural markup.

This tag is only valid when ultimately enclosed by a treeView tag; it does not have to be a direct child tag of the enclosing treeView tag, and can in fact be arbitrarily nested below the treeView parent tag.

Example:

<jato:treeView name="treeMenu">

 

<!-- Add a space for each level of the current node -->

<jato:treeLevel>

&nbsp;

</jato:treeLevel>

 

...

 

</jato:treeView>

Attribute Name

Description

Notes

minLevel

Valid values: positive number

Specifies the minimum node depth level at which to match.

RTExpr

maxLevel

Valid values: positive number

Specifies the maximum node depth level at which to match.

RTExpr

offset

Valid values: positive or negative integer

Specifies a positive or negative node level depth modifier to apply when rendering this tag. An offset of -n will cause the tag to render (level-n) times, whereas an offset of n will cause the tag to render (level+n) times.

RTExpr