| |
Description
Namespace : insight-topic="http://shaman.paris5.fr/xsp/insight-topic"
Element name : insight-topic:fetch-tree
Purpose :
Retrieves the Topic tree starting from a given Topic as root.
Inner scope
Current Topic node :
For each tree node representing a Topic, a current Topic is
defined inside the representing tag.
Parameters
Name
|
Role
|
Mandatory
|
Remarks
|
from-id |
Sets the Id of the Topic to get the tree from.
|
No, if enclosing tag defines a Topic.
|
Exclusive with from-fqname .
|
from-fqname |
Sets the full-qualified name of the Topic to get the
tree from (root Topic has FQName '/').
|
No, if enclosing tag defines a Topic.
|
Exclusive with from-id .
Should be used for tests only. As a matter of fact, a Topic
name can change during Topic's life, making its FQName
changing. So it is not a reliable information, Topic Id
should be preferred instead whenever possible.
|
Replaced by tree expansion of sub-items.
No, but it does not make sense to use fetch-tree
without expand-subtree.
Examples
Example 1
Create two Topics '1' and '2' under the root Topic, and display the
whole tree as XHTML.
<insight:operations>
<insight-topic:create parent-id="0" name="1" />
<insight-topic:create parent-id="0" name="2" />
<insight-topic:fetch-tree from-id="0" >
<ul>
<insight-topic:tree-item>
<li>
Topic FQName : <insight-topic:get-fqname/> <br/>
<insight-topic:expand-subtree/>
</li>
</insight-topic:tree-item>
</ul>
</insight-topic:fetch>
</insight:operations>
|
This gives the following XHTML output :
<ul>
<li>
Topic FQName : / <br/>
<ul>
<li>
Topic FQName : /1 <br/>
</li>
<li>
Topic FQName : /2 <br/>
</li>
</ul>
</li>
</ul>
|
| |