Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

It is not recommended to save the site tree to session or application scope for later use, as it will possibly be stale (if pages have been added or removed without restarting the webapp).  Instead, just use <nav:setSiteTreeVar> again when you need the most recent site tree.

Syntax

Wiki Markup<nav:setSiteTreeVar \ [var="_var_"\] \ [scope="*page*\|request\|session\|application"\] />

Attributes

Attribute name

Java type

Default
value

Dynamic value
accepted

Description

var

String

"siteTree"

No

The name of the variable to contain the site tree object.

scope

String

"page"

No

The scope for the variable.  It must be one of "page", "request", "session", or "application".

...

Warning
titleNote

This is a simple tag, so you may not include jsp scripting elements (<% ... %>, <%= ... %>, etc.) inside the body of the <nav:treeWalk> tag. You may use only JSP tags inside the body. 
Also note that if you try to walk the same node twice, an exception will be thrown.  This prevents infinite regress in the case of faulty logic or a cyclical tree object. 

Syntax

Wiki Markup<nav:treeWalk \ [root="_theRootObject_"\] \ [var="_currentNodeObjectVar_"\] \ [depth="_currentDepthVar_"\] > &nbsp; >
  ... &nbsp;
  <nav:subtreeWalk subroot="_subNodeObject_" /> &nbsp;
  ...
</nav:treeWalk>

Attributes

Attribute name

Java type

Default
value

Dynamic value
accepted

Description

root

Object
(should be tree-like)

the home section of the current site tree

Yes

The root object of the tree to be walked.

var

String

"var"

No

The name of the nested variable holding the current node in the tree.

depth

String

(No default value, ignored)

No

An optional variable name to expose the depth of the current node in the tree.  If this is included, the variable will be set to an integer representing how many levels down the tree the current node is, with 0 representing the root node, 1 representing a child of the root node, and so on.

subroot

Object
(should be tree-like)

(Required attribute)

Yes

The object below the current node to become the new current node of the tree.

...

And a possible output for this example:

Panel

Home:

  • Site Tree:
  • Bread Crump:
  • Pets:
    • Dogs:
      • German Shepherds:
      • Google for dogs!:
      • Beagles:
      • Labradors:
    • Cats:
      • American Shorthairs:
      • Manxes:
      • Persians:

 This <nav:setBreadcrumbVar> action sets a scoped variable to an object representing the breadcrumb for a particular target url in the site.   In this case, the breadcrumb object is a list of the target's ancestor pages, starting from the home page of the site and ending at the target page.  This is useful for a JSP which generates a breadcrumb for the current page.   Once you have set a variable to a breadcrumb object, you can iterate through it within a <c:forEach> tag.

It is not recommended to save the breadcrumb to session or application scope for later use, as it will possibly be stale (if pages have been added or removed without restarting the webapp).  Instead, just use <nav:setBreadcrumbVar> again when you need the most recent breadcrumb.

Syntaxunmigrated-wiki-markup

<nav:setBreadcrumbVar \ [url=_"targetUrl_"\] \ [var="_var_"\] \ [scope="*page*\|request\|session\|application"\] />

Attributes

Attribute name

Java type

Default
value

Dynamic value
accepted

Description

url

String

the url of the currently requested page

No

The url of the page whose breadcrumb is desired.  For best results, this should be a root-relative url beginning with a slash (e.g., "/foo/bar/baz.html"). 

var

String

"breadcrumb"

No

The name of the variable to contain the breadcrumb object.

scope

String

"page"

No

The scope for the variable.  It must be one of "page", "request", "session", or "application".

...

And a possible output for this example:

Panel

Home > Pets > Dogs

 This <nav:setPageVar> action sets a scoped variable to an object representing the navigation information for a particular target url in the site.   This is useful for a JSP which needs to know, for example, the list of links for the current page or section.  

It is not recommended to save the page object to session or application scope for later use, as it will possibly be stale (if pages have been added or removed without restarting the webapp).  Instead, just use <nav:setPageVar> again when you need the most recent page object.

Syntax

Wiki Markup<nav:setPageVar \ [url=_"targetUrl_"\] \ [var="_var_"\] \ [scope="*page*\|request\|session\|application"\] />

Attributes

Attribute name

Java type

Default
value

Dynamic value
accepted

Description

url

String

the url of the currently requested page or section

No

The url of the desired page.  For best results, this should be a root-relative url beginning with a slash (e.g., "/foo/bar/baz.html"). 

var

String

"page"

No

The name of the variable to contain the page object.

scope

String

"page"

No

The scope for the variable.  It must be one of "page", "request", "session", or "application".

...

And a possible output for this example:

Panel
  • German Shepherds
  • Google for dogs!
  • Beagles
  • Labradors