Dynamic UIX tree

Hi everybody, for the last couple of days i was trying to create a tree in UIX (with nodes and subnodes) based on dynamic data (not inline data defined in the UIX page) and i have found that the only way to do it(correct me if i'm wrong) is through java (not XML) and these are my main attempts:
1)
public class TreeTest1
public static UINode getPage()
HTMLWebBean div = new HTMLWebBean("div");
TreeBean tree = new TreeBean();
tree.setNodes(_getDataForTree());
div.addIndexedChild(tree);
BodyBean body = new BodyBean();
body.addIndexedChild(div);
return body;
static private DataObjectList _getDataForTree()
DataObject[] rows = new DataObject[5];
for (int j = 0; j < rows.length; j++)
DictionaryData row = new DictionaryData();
row.put("key", "" + j);
row.put("text", "" + j);
rows[j] = row;
return new ArrayDataSet(rows);
when i run this i just get level-1 nodes without any control over them (i.e i can't set their properties like destination, expandabilty..etc)
2) I have found this code here http://otn.oracle.com/jdeveloper/help/topic?inOHW=false&linkHelp=false&file=jar:file:/u01/webapps/OHW/ohw-app/jdeveloper/helpsets/jdeveloper/reference/reference.zip!/uix2-javadoc/oracle/cabo/ui/data/tree/SimpleTreeData.html but it is not mentioned how to add this DataModel to the tree.
3) In the TreeBean API there are methods to add any IUNode to the tree (including another tree) and here's an example :
public class TreeTest1
public static UINode getPage()
HTMLWebBean div = new HTMLWebBean("div");
TreeBean tree = new TreeBean();
tree.addIndexedChild(new TextNode("First tree node"));
tree.addIndexedChild(new TextNode("Second tree node"));
div.addIndexedChild(tree);
BodyBean body = new BodyBean();
body.addIndexedChild(div);
return body;
but the problem here is that the tree is not rendered, any other UINode is rendered perfectly.
I would appreciate any help.

Hi Houssen, I made a simple example. Try it.
The uix file
-------- BEGIN ----------
<?xml version="1.0" encoding="windows-1252"?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40">
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui">
<provider>
<data name="Proxy">
<method class="mypackage.Tree" method="getProxy" />
</data>
<data name="Nodes">
<method class="mypackage.Tree" method="getTree" />
</data>
</provider>
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title=""/>
</metaContainer>
<contents>
<pageLayout>
<contents>
<form name="menuForm" >
<contents>
<tree id="menuTree" formSubmitted="true"
data:nodes="nodes@Nodes"
data:proxy="proxy@Proxy" />
</contents>
</form>
</contents>
</pageLayout>
</contents>
</document>
</contents>
</dataScope>
</content>
<handlers>
<event name="expand" >
<method class="mypackage.Tree" method="handleExpand" />
</event>
</handlers>
</page>
-------- END ----------
The java file
-------- BEGIN ----------
package mypackage;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.EventResult;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.servlet.ui.BajaRenderingContext;
import oracle.cabo.ui.RenderingContext;
import oracle.cabo.ui.UIConstants;
import oracle.cabo.ui.data.DataObject;
import oracle.cabo.ui.data.tree.ClientStateTreeDataProxy;
import oracle.cabo.ui.data.tree.SimpleTreeData;
public class Tree implements DataObject {
private String submitURL = null;
public Tree(String submitURL){
this.submitURL = submitURL;
public static DataObject getProxy(RenderingContext rc, String ns, String name) {
return new Tree(null);
public static EventResult handleExpand(BajaContext context,Page page,PageEvent event)
throws Throwable
String state = event.getParameter(UIConstants.STATE_PARAM);
String node = event.getParameter(UIConstants.NODE_PARAM);
String selection = event.getParameter(UIConstants.SELECTION_PARAM);
EventResult result = new EventResult(page);
Object proxy = new ClientStateTreeDataProxy(null, state, node, selection);
result.setProperty("proxy", proxy);
return result;
public static DataObject getTree(RenderingContext rc, String ns, String name){
SimpleTreeData parent = new SimpleTreeData();
SimpleTreeData child = new SimpleTreeData();
child.setText("1");
child.setExpandable("collapsed");
parent.addChild(child);
child = new SimpleTreeData();
child.setText("2");
child.setExpandable("collapsed");
SimpleTreeData child2 = new SimpleTreeData();
child2.setText("2.1");
child2.setExpandable("collapsed");
child.addChild(child2);
parent.addChild(child);
return parent;
public Object selectValue(RenderingContext rc, Object p1) {
BajaContext bc = BajaRenderingContext.getBajaContext(rc);
EventResult result = EventResult.getEventResult(bc);
Object proxy = (result==null) ? null : result.getProperty("proxy");
if (proxy==null) proxy = new ClientStateTreeDataProxy( submitURL, null, null, null);
return proxy;
-------- END ----------
Hope this help
Rafael

Similar Messages

  • Uix:Tree - How to populate in jsp ?

    Hello all,
    I'm having trouble to know how to populate an <uix:tree> in a JSP page. I see the UIX Developer's guide and the SimpleTreeData example and the documentation about uix:jsp is very poor. The data that will be posted in the <uix:tree> was provided by IFS. Then, I populate a DataObjectList with the files name. The point is that I don't know how to make a link between this DataObjectList, populated in a class(*.JAVA) file and the <uix:tree>(*.JSP) file. I wanna know how to use only <uix:jsp> and don't use *.UIX files, only *.JSP and *.JAVA files, ok ?
    Here are some code part :
    This is the JSP file
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ page import="Hierarquia" %>
    <%@ page import="oracle.cabo.ui.data.DataObjectList" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Ifs - Publicação de Documentos
    </title>
    </head>
    <uix:document>
    <uix:styleSheet />
    <body>
    <uix:body>
    <uix:pageLayout>
    <uix:contents>
    <uix:form name="teste">
    <uix:contents>
    <%
    DataObjectList dados = null;
    Hierarquia x = new Hierarquia();
    x.conecta();
    x.populateTree();
    dados = x.getResultSet();
    %>
    <uix:formattedText text="Teste" />
    <uix:tree id="arvore_teste" nodesBinding="????" formName="teste">
    </uix:tree>
    </uix:contents>
    </uix:form>
    </uix:contents>
    </uix:pageLayout>
    </uix:body>
    </body>
    </uix:document>
    </html>
    Thanks folks !
    Carlos

    Carlos -
    I believe that the best way to do this is to use scriptable variables, eg:
      <uix:tree id="arvore_teste">
        <%
          // Assuming "dados" contains your tree data
          arvore_teste.setNodes(dados);
        %>
      </uix:tree>See the "Scriptable Variables" section in the "UIX JSP Tag Libraries" chapter of the UIX Developer's Guide for more info...
    Andy

  • Uix:tree

    Hi,
    * Could somebody give me an example of using the <uix:tree> tag to build the following tree?
    <PRE>
    Root
    |_____Category1
    |_____Cat1-Sub1
    |_____Cat1-Sub2
    |_____Category2
    |_____Cat2-Sub1
    |_____Cat2-Sub2
    |_____Cat2-Sub3
    </PRE>
    * This is for a UIX/JSP page (NOT a UIX/XML page).
    Thanks,
    Ranga

    You could start with SimpleTreeData.
    Please see
    http://otn.oracle.com/jdeveloper/help/topic?inOHW=false&linkHelp=false&file=jar:file:/u01/webapps/OHW/ohw-app/jdeveloper/helpsets/jdeveloper/reference/reference.zip!/uix2-javadoc/oracle/cabo/ui/data/tree/SimpleTreeData.html

  • [UIX] Tree - expanded state problem

    Hi,
    I'm experiencing problemswith my UIX Tree.
    In my tree I expanded some nodes (so I can view its contents :))
    Normally when I browse to some other pages and come back to the page containing the tree, it remembered the state in which I left it (same nodes still expanded). When I decide to insert new data (through a form page)to the database of which the tree 'feeds' itself, I get errors when browsing back to the page containing the tree, because it remembers its last state (which is nolonger valid, because of new records).
    What I want is that I can go back to the page containing my tree, with the tree refreshed (containing my newly inserted data) and still leave those nodes expanded that expanded earlier.
    Is this possible? (And is my problem clear? ;) )
    Gr.
    Philip

    I'm afraid our proxy does not support mutable trees. The only way to have it work at all is to create a new proxy when you mutate the tree data, which means you will not be able to save the expanded/collapsed state.
    This won't help you now, but ADF UIX is being migrated to ADF Faces which is based on JSF. In that realease mutable trees will be supported. There are early access releases of ADF Faces available here if you're interested:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/index.html

  • UIX tree, table-based example needed

    Has anyone ever used the UIX tree element (JDev help, UIX developer's guide, chapter 15) in combination with BC4J and/or Jheadstart generated UIX-pages? Any examples are welcome. I also can't get the (static :-/) example in the Help to expand when clicking the +/- icons. Help on this one too please. Tnx.

    You should try to post this question on JDevelper Forum.

  • UIX:Tree Control

    Hi,
    Has anybody used or know to use the UIX:Tree control part of the UIX Simple JSP Components? If so can you please tell me if this helps creating a DHTML Tree component?
    Thanks
    mn

    Hello there,
    You should check out the "Data Trees" chapter of the UIX Developer's Guide. It goes into a lengthy description of the tree component and how to code it in UIX. The tree component does not use DHTML, but rather rerenders based on its state (what is expanded and collapsed).

  • A recursive, dynamic menu tree in ColdFusion

    Hi
    i want to made a recursive, dynamic menu tree in ColdFusion.
    i search on net menu example, following example
    EXEMPLE
    But there are no file for download. Any one have these files
    for simples.
    Regards !

    Did you try googling the author's name? If you had, you have
    found this:
    http://www.sitepoint.com/article/dynamic-menu-coldfusion
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "<< CFMX >>" <[email protected]>
    wrote in message
    news:f411qf$636$[email protected]..
    > Hi
    >
    > i want to made a recursive, dynamic menu tree in
    ColdFusion.
    >
    > i search on net menu example, following example
    >
    http://builder.com.com/5100-6371-5196767.html
    >
    > But there are no file for download. Any one have these
    files for simples.
    >
    > Regards !
    >
    >
    >

  • ADF UIX Tree Component

    Hi
    I have created ADF UIX Tree Component on my screen and i want to have button expand all / collapse all for my tree .
    Can i create event for expand all / collapse all ADF UIX Tree ?
    If i can ,could you please advise how i should to do ?
    Thanks

    Hi Daniel,
    Are there any one can tell me when the new ADF UIX
    demo based on uix 2.2 be released?I'm not sure when any sample applications will be released, but there is an ADF UIX tutorial available here:
    http://otn.oracle.com/products/jdev/collateral/tutorials/9050/adfuix_tut.html
    I want to know if we can get databind uix tree
    component (or other ui components) from ADF data
    action control which return dataobject and something
    else.I'm not sure about the tree component - I'll try to find out whether that is/will be supported. Once your data controls are available in the Data Control Palette, you can bind them to components in your UIX page by:
    1. Selecting the data control that you want to bind.
    2. Selecting a component type from the "Drop As" choice.
    3. Dragging the data control onto the UIX page.
    This process is illustrated in the tutorial above.
    Andy

  • How to add text dynamically in  Tree view list box

    CS3/WIN<br />hi,<br />I am new in plugin development.<br />I have a Tree View List box on a dialog.<br />b I don't want to display text when i load the plugin.<br />b I want to insert text data when i click on "Insert" button on dialog. <br />I have defined  Adapter,Mgr,Observer for list box.it is working fine when i want to display data at loading time itself.but not when i click on insert button.<br />b In dialog observer i have defined this but it is not working<br /><br />b Dialog Observer::Update<br /><br />InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />IControlView* Grid = panelControlData->FindWidget(kESSGridTVWidgetID);<br />InterfacePtr<IStringListControlData> listControlData(Grid,UseDefaultIID());<br />if (theSelectedWidget == kESSInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{<br />listControlData->AddString(strText,kESSListBoxTextWidgetID); <br />}<br /><br />b it is showing error  <br />b operator new returning nil for an allocation size of 486022320 bytes<br />(..\..\..\source\components\memoryallocator\PMNew.cpp (552))<br />b Memory allocation failure<br />(c:\development\cobalt\source\public\includes\K2Allocator.h (131))<br />can any one help to get this..<br />Thanks.

    How to populate list in tree view  dynamically
    Hi,
    I am new to  Indesign Plugin creation.
    I want to create list in tree view dynamically.
    I tried wlistboxcomposite sdk sample in indesign cs4.
    I have some doubts in this.
    1. Can i write my own method in  WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter
    If it's possible how can i call this method.
    2. In this example they populating static string in constructor like this
    WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){
    K2Vector<PMString> lists;
    for (int32 i = 0; i< 12; i++){
    PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_bac k(name);}
    InterfacePtr<IStringListData> iListData(
    this, IID_ISTRINGLISTDATA);}
    and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can
    i achieve this.
    Pls do needful.
    Thanks
    Arun

  • How to create dynamic panel tree view?

    Hello,
         I can create dynamic pallete panel without any problems (from sdk/paneltreeview) , but i can't when it's a panel tree view (from sdk/paneltreeview). I don't know how to initialize it.  Can i call IID_ITREEVIEWWIDGETMGR's impl directly in ActionComponent to create panel widget? and how?
    Thanks in advance.

    solved by self

  • Dynamic add tree node and thread

    Hi,
    I implemented a thread by using SwingWorker class to execute the time-consuming file loading and processing task instead of the event-dispatching thread. However, I need to dynamically add node to a tree by using data returned by the file loader in my project's main frame like following:
    if (source == loadAffyItem) {
        //load affy file data to the application
        loader = new AffyFileLoader();
        //dynamically add node to the tree after data loading
        rawDataNode = treePanel.addObject(null, "Raw Data");
        DefaultMutableTreeNode node = new DefaultMutableTreeNode(new UserData("Pixel",   loader.getPixelMatrix()));
        pixelNode = treePanel.addObject(rawDataNode, node);
        node = new DefaultMutableTreeNode(new UserData("Signal", loader.getSignalMatrix()));
        signalNode = treePanel.addObject(rawDataNode, node);
    }However, I always get a NullPointer error by doing this way since the code to dynamically add node to the tree using data returned from loader, but the loader is executed
    in another thread and not finished yet. How could I make that code executed after the loader class is finished? Hope you could enlight me about this issue?
    thanks in advance!
    Jenny

    You'll have to redesign a bit. You could either have the separate thread add the node when it's finished (using SwingUtilities invokeLater to ensure you're updating the GUI in the Event Dispatch thread), or you could have the separate thread call-back or send an event when it's finished (and your main thread would listen).

  • Dynamic loading tree and data grid

    Hi All,
    I new to java as well as JSF. I am very impressed with the jsf and Sun Java Creator IDE. I made a sample project.
    Now I want to load tree and data grid with dynamic values how can I achieve this.
    Please help to find out some examples.
    Also I need to know who I can use SOAP call using JSF.
    Thanks
    CSCS

    To dynamically load a Basic Table (ui:table) from a database, see http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/databoundcomponents.html
    To dynamically load a Basic Table from other sources of data that are loaded into an array or such, see http://blogs.sun.com/roller/page/divas?entry=table_component_sample_project
    To dynamically CREATE a Basic Table, see http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/createTableDynamically.html and http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/add_component_to_table.html
    To dynamically create an HTML table on the fly, see section 7.5 in Chapter 7 of the Field Guide at http://developers.sun.com/prodtech/javatools/jscreator/learning/bookshelf/index.html
    To dynamically create a tree, see Dynamic Tree example at http://developers.sun.com/prodtech/javatools/jscreator/reference/index.jsp.
    A tutorial for dynamically creating a tree from a database is work in progress.
    Hope this helps,
    Chris

  • UIX Tree: "Expand All" Functionality

    Hello,
    I have a question about the Tree in UIX. We are using the Tree component in a UIX Page (JDeveloper 10.1.2). With the tree we also make use of the ClientStateTreeDataProxy class.
    It is possible to expand and collapse the tree, but I want to have 1 button to be able to expand all nodes on the first level of the tree or if this isn't possible to expand all the nodes.
    I have try to simulate this using struts actions, but I'm unable to simulate the state request-parameter. I also try to look if something is possible with the ClientStateTreeDataProxy class. Which possibilities are there to manipulate the tree component?
    Thanks, Dennis

    Thanx Jeanne,
    You brought me on a idea with the UIX Developer's Guide and EXPANDABLE_EXPANDED value.
    I couldn't figure out how the expand property was filled, because it wasn't done in the ADF BC ViewObject. We have a Utility class that creates a DataObject from the ViewObject Data and here the expand property was set.
    Now it was easy to build a ExpandAll option. It is possible to access the HttpServletRequest object were the DataObject is created. By setting a attribute in the request I could react on that and give the expand property indeed the value EXPANDABLE_EXPANDED.
    Dennis

  • Dynamically changing tree node

    I'm having a problem when dynamically changing a JTree node. I can add a node to the tree no problem. If I then change the name of the node (via a property table in the app) and fire a node changed event, the change is not properly reflected in the tree, in that the new name is shown but the selection box remains the same size as the old (longer) name.
    If I manually click on the node with the mouse and then change the name everything works fine. Although this is only manifesting itself as a cosmetic problem I think this could be a timing problem that might show up under other circumstances. I have another tree in the app where this problem does not show up at all.
    Any ideas?
    Thanks

    1)fluctuating tree...what???
    2) Create a JPopUpMenu or a subclass. Add a mouselistener to the JTree.
    In this listener you handle rightMouseClick.
    When you detect such an mouse action open the popup with popup.show()
    If you need the selected component call JTree.getLastSelectedPathComponent().
    If you want to check if it is null use this: JTree.getSelectionModel().isSelectionEmpty(). So you can prevent nullpointers, cause selection can be empty
    You can write a method for your popup to give it the selected component.
    Then call the .show().
    Tweety

  • UIX Tree for all who needs help!!!

    Hi guys!!!
    Uix team can`t write any examples of this subject, we decided to create it :-)...
    There is an example of working tree with proxy for JDev 9.03!!!
    All data takes from the DataBase. We use a ViewObject for DataBinding with hierarhical querry
    (start with...
    connect by prior... )! Dont forget to write this querry!
    For using this querry U must use primary key (but not the rowID Item!!!!).
    Don`t forget to change the name of your package, appmodule in UIX and Java!!!
    There are Java & Uix files here!
    If U have any questions ask us for e-mail: [email protected] !
    With best regards,
    Diamond Developer Team (Stukotiy Luda (advancd support), Chindakov Alex, Druppov Serge).
    From Russia!
    P.S. We will be glad to see the working example of hGrid with the same DataBinding!
    package mypackage1;
    import java.lang.String;
    import oracle.cabo.data.jbo.ui.bind.UIBindingUtils;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.ui.BajaRenderingContext;
    import oracle.cabo.ui.RenderingContext;
    import oracle.cabo.ui.UIConstants;
    import oracle.cabo.ui.data.DataObject;
    import oracle.cabo.ui.data.DataObjectList;
    import oracle.cabo.ui.data.tree.ClientStateTreeDataProxy;
    import oracle.cabo.ui.data.tree.SimpleTreeData;
    import oracle.jbo.NoDefException;
    import oracle.jbo.Row;
    import oracle.jbo.RowIterator;
    import oracle.jbo.ViewObject;
    import oracle.jbo.server.ApplicationModuleImpl;
    // --- File generated by Oracle Business Components for Java.
    public class Mypackage1ModuleImpl extends ApplicationModuleImpl
    * This is the default constructor (do not remove)
    public Mypackage1ModuleImpl()
    * Container's getter for TsStatView1
    public TsStatViewImpl getTsStatView1()
    return (TsStatViewImpl)findViewObject("TsStatView1");
    * Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    launchTester("mypackage1", "Mypackage1ModuleLocal");
    public class JBODataObjectList implements DataObjectList
    * Create a data object list based on the current range of
    * this row iterator.
    public JBODataObjectList(RowIterator iterator)
    this(iterator, Integer.MAX_VALUE);
    * Create a data object list based on the current range of
    * this row iterator, with a restricted size.
    public JBODataObjectList(RowIterator iterator, int maxSize)
    _iterator = iterator;
    size     = Math.min(iterator.getRowCountInRange(), maxSize);
    * Return the size of the list.
    public int getLength()
    return _size;
    * Get an item from the list.
    public DataObject getItem(int index)
    // Make sure we're in range
    if ((index < 0) || (index >= _size))
    throw new IndexOutOfBoundsException();
    Row row = _iterator.getRowAtRangeIndex(index);
    if (row == null)
    return null;
    return new DO(row);
    // An inner class that handles a single row
    static private final class DO implements DataObject
    public DO(Row row)
    _row = row;
    public Object selectValue(RenderingContext context, Object key)
    // Make sure that the key is non-null
    if (key != null)
    try
    // Treat the key as an attribute name
    return _row.getAttribute(key.toString());
    catch (NoDefException nde)
    // Do nothing. It's legal to pass an invald key to DataObjects.
    return null;
    private final Row _row;
    private final RowIterator _iterator;
    private final int _size;
    public class Tree implements DataObject {
    private String submitURL = null;
    public Tree(String submitURL){
    this.submitURL = submitURL;
    public static DataObject getProxy(RenderingContext rc, String ns, String name) {
    return new Tree(null);
    public static EventResult handleExpand(BajaContext context,Page page,PageEvent event)
    throws Throwable
    String state = event.getParameter(UIConstants.STATE_PARAM);
    String node = event.getParameter(UIConstants.NODE_PARAM);
    String selection = event.getParameter(UIConstants.SELECTION_PARAM);
    EventResult result = new EventResult(page);
    Object proxy = new ClientStateTreeDataProxy(null, state, node, selection);
    result.setProperty("proxy", proxy);
    return result;
    public static int s = 0; // ������
    public static int i = 0; // ������
    // � ��������, ����������� ����, ���������� ��� ����� ������� �������� �����������!!!
    public static String mOwner[]=new String[100]; // �������� ���� fk_owner �� ����
    public static String mName[]=new String[100]; // �������� ���� fc_name �� ����
    public static DataObject getTree(RenderingContext rc, String ns, String name){
    SimpleTreeData child = new SimpleTreeData();
    SimpleTreeData parent = new SimpleTreeData(); // ����������� ��������
    SimpleTreeData parent1 = new SimpleTreeData(); // �������� �������
    SimpleTreeData parentBuf[] = new SimpleTreeData[130]; // ����� ��� �������� ����������� ��������
    int ownerInt; // ��� �������� fk_owner ������� ������
    int buf = 0; // ��� �������� fk_owner ������� ������
    String ownerStr, // --- � ������� ������
    valueColumn; // ������ �������� ������� ������
    if (i==0)
    ViewObject vo = UIBindingUtils.getViewObject(rc); // ��� VO
    vo.previous();
    //for(s=0;s<96;s++)
    while(vo.hasNext())
    Row row=vo.next();
    mOwner[s]=row.getAttribute("FkOwnerid").toString();
    mName[s]=row.getAttribute("FcName").toString();
    s++;
    for (i=0;i<s;i++)
    ownerStr=mOwner;
    valueColumn=mName[i];
    //ownerStr = row.getAttribute("FkOwnerid").toString();
    ownerInt = Integer.parseInt(ownerStr);
    //valueColumn = row.getAttribute("FcName").toString();
    if(ownerInt == 0) // ������ ������
    parent1 = new SimpleTreeData();
    parent1.setText(valueColumn);
    parent1.setExpandable("expanded");
    parent.addChild(parent1);
    buf = 0;
    // parentBuf[ownerInt] = new MySimpleTreeData();
    else
    if(ownerInt != buf)
    if(ownerInt > buf)
    child = new SimpleTreeData();
    child.setText(valueColumn);
    child.setExpandable("expanded");
    parent1.addChild(child);
    parentBuf[ownerInt] = parent1;
    parent1 = child;
    buf = ownerInt;
    else
    child.setExpandable("no");
    parent1 = parentBuf[ownerInt];
    child = new SimpleTreeData();
    child.setText(valueColumn);
    child.setExpandable("expanded");
    parent1.addChild(child);
    parent1 = child;
    buf = ownerInt;
    else
    child.setExpandable("no");
    child = new SimpleTreeData();
    child.setText(valueColumn);
    child.setExpandable("expanded");
    //parentBuf[ownerInt].addChild(child);
    parent1 = parentBuf[ownerInt];
    parent1.addChild(child);
    parent1 = child;
    if(i == 95)
    child.setExpandable("no");
    //child.setExpandable("no");
    return parent;
    public Object selectValue(RenderingContext rc, Object p1) {
    BajaContext bc = BajaRenderingContext.getBajaContext(rc);
    EventResult result = EventResult.getEventResult(bc);
    Object proxy = (result==null) ? null : result.getProperty("proxy");
    if (proxy==null) proxy = new ClientStateTreeDataProxy( submitURL, null, null, null);
    return proxy;
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="TsStatView1AppModule"
    definition="Project4.Mypackage1Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="TsStatView1"
    rangeSize="3" />
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <data name="Proxy">
    <method class="mypackage1.Tree" method="getProxy" />
    </data>
    <data name="Nodes">
    <method class="mypackage1.Tree" method="getTree" />
    </data>
    </provider>
    <contents>
    <bc4j:rootAppModuleScope name="TsStatView1AppModule" >
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <bc4j:viewObjectScope name="TsStatView1" >
    <contents>
    <pageLayout>
    <contents>
    <form name="menuForm" >
    <contents>
    <tree id="menuTree" formSubmitted="true"
    data:nodes="nodes@Nodes"
    data:proxy="proxy@Proxy" />
    </contents>
    </form>
    </contents>
    </pageLayout>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </document>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <event name="expand" >
    <method class="mypackage1.Tree" method="handleExpand" />
    </event>
    </handlers>
    </page>

    Don't forget, you can make code easier to read by enclosing it in [code ]  tags (without the space in the first tag), so it looks like this:
    <provider>
         <data name="bundle">
              <bundle class="strings" />
         </data>
    </provider> instead of this:
    <provider>
         <data name="bundle">
              <bundle class="strings" />
         </data>
    </provider>

Maybe you are looking for