MainJavadocExample
SAXTreeBuilder Demo

The SAXTreeBuilder is used to create the Framework module Explorer Tree seen on the left. This module also uses a TreeSearchElementRenderer to render the tree within a RTI SearchForm and an ExploreTreeRenderer for actual rendering of the user interface component.

The XML used to load the module tree is shown below.


XML Configuration:
  <!-- ================================================================================ -->
  <!--                             Framework Tree Renderer                              -->
  <!-- ================================================================================ -->
  <SearchForm name="FrameworkTree" 
              category="FrameworkDocs"
              rendererClass="com.raritantechnologies.searchApp.taglibrary.SearchFormTableRenderer" >
                 
    <SearchElementRenderer rendererClass="com.raritantechnologies.utils.tree.taglibrary.TreeSearchElementRenderer" 
                           action="index.jsp" >

     <!-- ================================================================== -->
     <!-- The SAXTreeBuilder that will create the renderable TreeRoot object -->
     <!-- ================================================================== -->
     <TreeBuilder class="com.raritantechnologies.utils.tree.SAXTreeBuilder"
                 fileName="BASE_PATH/WEB-INF/conf/RaritanFrameworkTree.xml"
                 treeName="Framework Modules" >

         <TreeNode
             nodeTag="ConfigurableType"
             nameAttribute="name" >
         </TreeNode>

         <TreeNode
             nodeTag="Link"
             nameAttribute="type" >
              <AttributeMap input="href" output="href" />
         </TreeNode>

     </TreeBuilder>

     <!-- =============================================================================== -->
     <!--                       Explore Tree Renderer configuration                       -->
     <!-- =============================================================================== -->
     <TreeRenderer class="com.raritantechnologies.utils.tree.taglibrary.ExploreTreeRenderer" >

        <ChangeNodeScript>
           function CategoryChangeNode( href )
           {
             parent.frames['display'].location.href = href;
           }
        </ChangeNodeScript>
     </TreeRenderer>

     <LinkRenderer class="com.raritantechnologies.utils.tree.TaxonomySearchHyperlinkRenderer"
                   hrefParam="href" />

   </SearchElementRenderer>

  </SearchForm>

XML source for the SAXTreeBuilder - this shows a sample of the XML Source for Framework Explorer Tree shown on the left: (Note - the interactive XMl is rendered using the XMLEditorRenderer.)

<ConfigurableObjects>
   <ConfigurableType href="./SystemArchitecture.jsp" name="Architecture">
   <ConfigurableType name="Documents">
   <!-- ===================================================================================== -->
   <!-- SearchSources -->
   <!-- ===================================================================================== -->
   <ConfigurableType href="/FrameworkDocumentation/doc/descriptions/SearchSources/SearchSources.jsp" name="Search Sources">
   <!-- ====================================================================================== -->
   <!-- Source Selection Elements -->
   <!-- ====================================================================================== -->
   <ConfigurableType href="/FrameworkDocumentation/doc/descriptions/SearchSelection/SourceSelectionElements.jsp" name="Source Selection Elements">
   <!-- ====================================================================================== -->
   <!-- Source Selection Controls -->
   <!-- ====================================================================================== -->
   <ConfigurableType href="/FrameworkDocumentation/doc/descriptions/SearchSelection/SourceSelectionControls.jsp" name="Source Selection Controls">
   <ConfigurableType>
</ConfigurableObjects>