Creating a Tree

To create a tree:

  1. In the Design Structure Window of the desired file, locate the node in which you wish to insert a tree component.
  2. In the Component Palette, select Navigation Components from the dropdown list, and then drag and drop the tree component to the parent node of your choice.

    The tree node is inserted and highlighted under the expanded parent node.

  3. In the Property Inspector, set the following attributes for the tree component:
  4. To use a node stamp, do the following:
    1. In the Design Sructure Window, expand the tree node to locate the nodeStamp named child node.
    2. Right-click nodeStamp and choose Insert inside nodeStamp to insert the desired child components for the node stamp.
  5. To make the tree interactive, see About TreeProxy.

Note: To use data binding, see Data Binding a Component Attribute.

Example (UIX XML)


Example: A tree with a databound proxy attribute.

<ctrl:content xmlns:ui="http://xmlns.oracle.com/uix/ui">
  <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
      <tree name="tree1" proxy="${TreeProxy.proxy}">
        <nodes>
          <nodes text="Root1" expandable="collapsed"/>
          <nodes text="Root2" expandable="collapsed"/>
          <nodes text="Root3" expandable="expanded">
            <nodes text="Node3-1"/>
            <nodes text="Node3-2" expandable="expanded">
              <nodes text="Node3-2-1" selected="false" />
              <nodes text="Node3-2-2" selected="true" expandable="no"/>
              <nodes text="Node3-2-3" expandable="no"/>
            </nodes>
            <nodes text="Node3-3" expandable="no"/>
          </nodes>
          <nodes text="Root4" expandable="collapsed"/>
        </nodes>
      </tree>
    </contents>
    <provider>
      <data name="TreeProxy">
        <method class="oracle.cabo.doc.demo.DataTrees"
                method="getTreeProxy"/>
      </data>
    </provider>
  </dataScope>
</ctrl:content>

<ctrl:handlers xmlns="http://xmlns.oracle.com/uix/controller">
  <event name="expand">
    <method class="oracle.cabo.doc.demo.DataTrees"
            method="expandEventHandler"/>
  </event>
</ctrl:handlers>    

About Tree
About Tree and Frame

Working with Navigation Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.