| Main | Javadoc | Example |
|
|
The TreeSearchSource can be used to create a searchable source from any RTI Tree object. This demo uses the Framework Documentation tree shown to the left to provide a search box entry into the tree.
To use the demo, type in the name of an RTI Framework class (e.g. 'TreeSearchSource' ). For a more advanced example that adds the Javadoc and Example links to the output, see the LookupSearchSource example.
<!-- ========================================================================= -->
<!-- Tree Search Source -->
<!-- ========================================================================= -->
<SourceType name="FrameworkTreeSource" type="TreeSearchSource"
sourceFactoryClass="com.raritantechnologies.utils.tree.TreeSearchSource"
queryProcessor="com.raritantechnologies.utils.tree.TreeSearchSource"
blankQueryReturnsAll="true" nestedNodes="Example" >
<SearchFields fieldOperator="AND" >
<Field ID="name" />
<Field ID="path" />
<Field ID="description" />
<Field ID="moduleType" exactMatch="true" />
</SearchFields>
<TreeBuilder class="com.raritantechnologies.utils.tree.SAXTreeBuilder"
fileName="BASE_PATH/WEB-INF/conf/RaritanFrameworkTree.xml"
treeName="Framework Modules"
blankQueryReturnsAll="true" >
<TreeNode nodeTag="ConfigurableType" nameAttribute="name" >
<AttributeMap input="moduleType" output="moduleType" />
</TreeNode>
<TreeNode nodeTag="Link"
nameAttribute="type" >
<AttributeMap input="href" output="href" />
<AttributeMap input="description" output="description" />
</TreeNode>
</TreeBuilder>
</SourceType>