About Tree and Frame

You may want to use frames with the tree component. The following three sets of UIX XML code files show how to use the tree and frame components.

The first set of code defines the frames.


Example 1:

<page xmlns="http://xmlns.oracle.com/uix/controller"
      xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
      xmlns:data="http://xmlns.oracle.com/uix/ui"
      xmlns:http="http://www.w3.org/TR/REC-html40">
  <content>
    <frameBorderLayout xmlns="http://xmlns.oracle.com/uix/ui" >
      <left>
        <frame source="leftframe.uix" name="tree" width="30%"/>
      </left>
      <center>
        <frame source="centerframe.uix" name="contents" />
      </center>
    </frameBorderLayout>
  </content>
</page>    

The next set of code defines the tree itself with some new destinations. The 'targetFrame' key specifies the frame to direct the content to.


Example 2:

<ctrl:page xmlns="http://xmlns.oracle.com/uix/ui"
           xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
           xmlns:data="http://xmlns.oracle.com/uix/ui"
           xmlns:html="http://www.w3.org/TR/REC-html40"
           expressionLanguage="el">

  <ctrl:content xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <body>
      <contents>

        <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
          <contents>

            <!-- UIX Components -->
            <form name="myForm" >
              <contents>
                <tree id="tree"
                      formSubmitted="true"
                      nodes="${data:data().Nodes.nodes}"
                      proxy="${TreeProxy.proxy}"/>
              </contents>
            </form>
          </contents>

          <provider>
            <!-- Data -->
            <data name="TreeProxy">
              <method class="oracle.cabo.doc.demo.DataTrees"
                      method="getTreeProxy"/>
            </data>
            <data name="data:Nodes">
              <inline>
                <nodes text="Shop"
                       destination="http://otn.oracle.com/index.html"
                       targetFrame="contents"
                       expandable="expanded">
                  <nodes text="Books"
                          destination="http://www.osborne.com/oracle/"
                          targetFrame="contents"
                          expandable="expanded">
                    <nodes text="Sale"
                           destination="http://www.oracle.com"
                           targetFrame="contents"
                           expandable="expanded">
                      <nodes text="Paperbacks"
                             destination="http://www.oracle.com/appsnet/"
                             targetFrame="contents"/>
                    </nodes>
                    <nodes text="Fiction"
                           destination="http://www.oracle.com/oramag/"
                           targetFrame="contents"/>
                    <nodes text="Nonfiction"
                           destination="http://otn.oracle.com/support/content.html"
                           targetFrame="contents"/>
                  </nodes>
                  <nodes text="Hardware"
                        expandable="expanded" >
                    <nodes text="Desktops"
                           destination="http://otn.oracle.com/training/content.html"
                           targetFrame="contents"/>
                    <nodes text="Notebooks"
                           destination="http://otn.oracle.com/tech/content.html"
                           targetFrame="contents"/>
                  </nodes>
                </nodes>
              </inline>
            </data>
          </provider>
        </dataScope>
      </contents>
    </body>
  </ctrl:content>

  <!-- UIX Servlet -->
  <ctrl:handlers xmlns="http://xmlns.oracle.com/uix/controller">

    <event name="expand">
      <method class="oracle.cabo.doc.demo.DataTrees"
              method="expandEventHandler"/>
    </event>

  </ctrl:handlers>
</ctrl:page>    

The last segment is an empty UIX XML file.


Example 3:

<ctrl:page xmlns="http://xmlns.oracle.com/uix/ui"
           xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
           xmlns:data="http://xmlns.oracle.com/uix/ui"
           xmlns:html="http://www.w3.org/TR/REC-html40"/>    

About Tree
About FrameBorderLayout and its Named Children

Working with Navigation Components
Working with Layout Components

 

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