OpenWGA 7.10 - TMLScript reference
TMLContext "this"Method :
isselected()
On object | TMLContext "this" |
Usage |
Returns if the current document is the main document of the current request or an ancestor document of it |
Description |
This is a tool function for building navigators, where often the document that currently is displayed along with all its parent documents should be shown in a special "selected" mode. The document that is "displayed" in a WebTML request is the main document, and this method tests if the document currently in context is this main document, or if it is a document that is an "ancestor" of it, i.e. that is somewhere in the parents path of the main document. If this method returns true, the navigator should display the document in some special selected mode. |
Return value | (Boolean) |
Allowed in script types |
|
Examples |
Assuming the following document hierarchy:
When calling a WebTML page with document "Grandchild1" as main document, the method isSelected() will return true for the following documents:
|