Hierarchical Tree Table

Hello! There,
     I have to add a JTable in java application, It is so simple but I have problem when requirements has changed like Table/Grid should be in Hierarchical. Means Hierarchical Table like Table with Tree. I have a Hierarchical Tree Table sample but this is a XUL example. So, If you want to see, create a sample.xul file and put below code to that and open using mozilla browser.
THANKS IN ADVANCE
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="Hierarchical-Tree" title="Programming Languages at Hierarchical Tree"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree rows="24">
<treecols>
<treecol id="college-student" label="Language" primary="true" flex="3"/>
<treecol id="degree" label="Uses" flex="6"/>
     <treecol id="session" label="Version" flex="1"/>
</treecols>
<treechildren>
<treeitem container="true" open="true">
<treerow>
<treecell label="Java"/>
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell label="Servlet"/>
<treecell label="Enterprise App. Development"/>
               <treecell label="2.4"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell label="Java Server Pages (JSP)"/>
<treecell label="Enterprise App. Development"/>
               <treecell label="2.0"/>
</treerow>
</treeitem>
          <treeitem>
<treerow>
<treecell label="Java Server Faces (JSF)"/>
<treecell label="Enterprise App. Development"/>
               <treecell label="2.0"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
</treechildren>
</tree>
</window>

Hi,
A well implemented JTreeTable can you found as a part from the SwingX-library.
You can find those library at here
Olek

Similar Messages

  • Recommendations for a product that does hierarchical tree tables

    Need to be able to aggregate on multiple columns. Also add a column to a table on the fly. Thanks in a advance!

    Someone is lying to you.

  • Hierarchal tree in FORMS

    Hi,
    I have a hierarchal tree table that I want to represent using forms (insert and update data in the tree table).
    Are there any LINKS or documentation that can help me with my little project :-)
    Thanks,
    Marc.

    The help file has a fairly detailed description of how to manipulate the tree control.
    Provided you have a table that can do this I would do "connect by prior" and "start with" SQL statement and use the pseudo column called "level" to determine when to create a new sub tree and when to end it.

  • It's possible to make Hierarchical Tree from multiple tables ?

    the famous example for Hierarchical Tree is about employee_id and manager_id field in employees table ............ so I was wondering it's possible to make[b] Hierarchical Tree from multiple tables ? and How ??
    if the answer associate with example that will be so kind of you :D
    and thanks in advance.

    HI
    use curose in when new form instance or procedure then u can got data more then one table like that
    DECLARE
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE ;
    child_node ftree.node ;
    item_value VARCHAR2(30);
    cursor prime_cur is select main_desc mgr_name, main_code dept
    from pur_item_group_mst;
    cursor child_cur(v_dept number) is select sub_desc,sub_code
    from pur_item_group_dtl where main_code = v_dept ;
    BEGIN
    htree := Find_Item('tmp.tree4');
    for dummy in prime_cur loop
    new_node := Ftree.Add_Tree_Node(htree,
    ftree.root_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    dummy.mgr_name,
    'D:\ORYX_POLYBAGS\accept',
    dummy.dept);
    for child in child_cur(dummy.dept) loop
         child_node := Ftree.Add_Tree_Node(htree,
    new_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    child.sub_desc||' '||'('||child.sub_code||' '||')',
    'D:\ORYX_POLYBAGS\next',
    child.sub_code);
    end loop;
    end loop;
    END;
    Rizwan Shafiq
    www.rizwanshafiq.blogspot.com

  • Insert an HTML Table tag as a value in a Tree Table

    Hi helper,
    Can I insert an HTML Table tag inside a TreeTable (Hierarchical data) using AdvancedDataGrid as a value?
    I need to create a Tree table in flex and I have beside normal int values some cells that need to show a certain images in an HTML Table I will create.
    Is it possible?
    Please advice
    Thanks
    Jo

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>It depends on where you get the list of images<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Yossi Bar<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 1:14 AM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: Insert an HTML Table tag as a value in a Tree Table<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />Yossi Bar in <br><br /><br><br /><b>Developers</b> --<br><br />  Insert an HTML Table tag as a value in a Tree Table<br><br /><br><br />Thanks Alex, <br><br />What is the way to implement HorizontalLIst of images for<br />AdvancedDataGridColumn? <br><br /><br><br />In the code here I create a tree table and in Actual column I show an image: <br><br /><br><br />&lt;mx:AdvancedDataGrid width=&quot;100%&quot; height=&quot;100%&quot;<br />folderClosedIcon=&quot;{null}&quot; folderOpenIcon=&quot;{null}&quot;<br />defaultLeafIcon=&quot;{null}&quot;&gt; <br><br /><br><br />&lt;mx:dataProvider&gt; <br><br />            &lt;mx:HierarchicalData<br />source=&quot;{dpHierarchy}&quot;/&gt; <br><br />        &lt;/mx:dataProvider&gt; <br><br />        &lt;mx:groupedColumns&gt; <br><br />         &lt;mx:AdvancedDataGridColumn<br />headerText=&quot;&quot; width=&quot;50&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumn<br />dataField=&quot;Region&quot; backgroundColor=&quot;haloSilver&quot;<br />headerText=&quot;Region title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumnGroup<br />headerText=&quot;Group Header&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;<br />headerText=&quot;Territory Rep&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;<br />headerText=&quot;Actual title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:itemRenderer&gt; <br><br />&lt;mx:Component&gt; <br><br />&lt;mx:VBox horizontalAlign=&quot;center&quot;&gt; <br><br />&lt;mx:Image width=&quot;50&quot; source=&quot;{data.Actual}&quot;/&gt; <br><br />&lt;/mx:VBox&gt; <br><br />&lt;/mx:Component&gt; <br><br />&lt;/mx:itemRenderer&gt; <br><br />&lt;/mx:AdvancedDataGridColumn&gt; <br><br /><br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;<br />headerText=&quot;Estimate title&quot; headerRenderer=&quot;mx.controls.Label&quot;/&gt;<br /><br><br />            &lt;/mx:AdvancedDataGridColumnGroup&gt;<br /><br><br />        &lt;/mx:groupedColumns&gt; <br><br />    &lt;/mx:AdvancedDataGrid&gt; <br><br /><br><br />Please advise, <br><br /><br><br />Thanks <br><br /><br><br />Jo <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d1ae/2">Insert an HTML Table tag<br />as a value in a Tree Table</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d1ae!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • How to display the icon as folder in tree table representation

    Hi,
    I am displaying the hierarchical structure for one table in which the expanding comes like normal ">". But i want to make it like folder icon.How is it possible plz suggest me.
    Thanks,
    Harsh

    The folder icons are added in the node stamp of the tree table.
    <f:facet name="nodeStamp">
      <af:column headerText="Directory Name" width="200" sortable="true" rowHeader="unstyled"
      sortProperty="name" id="c2">
      <af:panelGroupLayout id="pgl2">
      <af:image source="#{directory.icon}" id="nodeIcon"
      inlineStyle="margin-right:3px; vertical-align:middle; height:16px; width:16px;"
      shortDesc="directory"/>
      <af:outputText id="directoryStamp" inlineStyle="vertical-align:middle" value="#{directory.name}"/>
      </af:panelGroupLayout>
      </af:column>
      </f:facet>
    You can see the full source if you click the 'view source' link in the menu bar of the demo.
    Timo

  • Make an hierarchical Tree in oracle Forms 6i

    Hi everybody,
    I want to make an hierarchical tree. I work in Forms 6i
    I create one non database block e.g. 'Bloc2' then
    add hierarchical control item in that. e.g 'Menu'.
    I create a record group named 'RG_DATA_TEST'
    Before I use a table in this record_group.
    I want a tree as this :
    - Menu1
    Menu1 option1
    Menu1 option2
    - Menu1 option3
    Menu option3 Sub opt 3
    + Menu2
    the table 'Menu_tree' is described' :
    CREATE TABLE MENU_tree
    ID NUMBER(5),
    LABEL VARCHAR2(128 BYTE),
    ICON VARCHAR2(40 BYTE),
    MASTER NUMBER(5),
    STATUS NUMBER(1) DEFAULT 1,
    VALUE VARCHAR2(128 BYTE)
    Here the data in the table :
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (1, 'Menu1', 'mainmenu', NULL, 1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (
    2, 'Menu1 Option 1', 'optionmenu', 1, 1, 'Dialog11');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 3, 'Menu1 Option 2', 'optionmenu', 1, 1, dialog12');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (4, 'Menu1 Option 3', 'optionmenu', 1, 1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 5, 'Menu1 Opt 3 Sub Opt 3', 'suboptionmenu', 4, 1, 'Dialog131');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 6, 'Menu2', 'mainmenu', NULL, -1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 7, 'Menu2 Option1', 'optionmenu', 6, 1,'Dialog21');
    The record_group use this instruction SELECT :
    SELECT STATUS, LEVEL, LABEL, ICON, VALUE
    FROM MENU_tree
    CONNECT BY PRIOR ID = MASTER
    START WITH MASTER IS NULL
    And At the trigger When_new_form_instance , i do this code :
    DECLARE
    htree ITEM;
    V_IGNORE number;
    BEGIN
    HTREE := FIND_ITEM('BLOC2.MENU');
    V_IGNORE := POPULATE_GROUP('RG_DATA_TEST');
    FTREE.POPULATE_TREE(htree);
    END;
    When i run the forms, It don't give me a structure of node.
    It give me only a icon with two arrows.
    Where is the problem ?
    Must I add code somewhere ?
    Help me for your ideas.
    Regards.
    Edited by: 794982 on 17 sept. 2010 04:55
    Edited by: 794982 on 17 sept. 2010 05:01
    Edited by: 794982 on 17 sept. 2010 05:04
    Edited by: 794982 on 17 sept. 2010 05:06
    Edited by: 794982 on 17 sept. 2010 05:13
    Edited by: 794982 on 17 sept. 2010 05:19
    Edited by: 794982 on 17 sept. 2010 05:23

    Ok Francois Thanks for your response.
    Just I pricise i work with oracle forms version 9.0.4.0.19 .
    But I am putting this code in trigger When_New_form_Instance but it didn't work.
    When I execute it just shows a line with two arrows but not a real tree.
    Then I do a block-non based and a elemnt with type hierarticall tree and a canevas.
    and i create a record_group. and in a palette property of the element i precise the canevas and the record_group
    I don't khnow where is the problem ?
    Any other suggestion ? please
    Regards.

  • Problem when selecting child node in Hierarchical Tree

    I have a hierarchical tree on a form populated thru a table query(form1). When I click on a child node, it opens form2 which contains a tab canvas. After closing forms, I return to the form1(containing Tree). At this point If I want to click on the same child node, I should be able to open form2 again. This doesn't happen.
    I have the following code in my When-Tree-node_selected trigger:
    Declare
    htree item;
    vnode_label varchar2(50);
    node_clicked FTREE.NODE;
    vnode_value number;
    vnode_depth number;
    v_type number;
    v_value varchar2(100);
    v_form_name varchar2(100);
    v_alert_return number;
    begin
    -- Find the tree itself.
    htree := FIND_ITEM('tree_block.tree');
    node_clicked := :SYSTEM.TRIGGER_NODE;
    vnode_value := FTREE.NODE_label;
    -- Find the value of the node clicked on.
    vnode_label := FTREE.GET_TREE_NODE_PROPERTY (htree,:SYSTEM.TRIGGER_NODE,FTREE.NODE_label);
    vnode_depth := to_number(ftree.get_tree_node_property(htree,:SYSTEM.TRIGGER_NODE,ftree.Node_depth));
    --Open form for node selected on tree and/or specific tab page
    if vnode_depth <> 1 then
    if :system.trigger_node_selected = 'TRUE' then CASE vnode_label
    WHEN 'Personal' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Citizenship' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Emergency Contact' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    if id_null(Find_form(v_form_name)) then
    open_form(:global.application_path || v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);
    else
    go_form(v_form_name);
    end if;
    END IF;
    elsif vnode_depth = 1 then
    if :system.trigger_node_SELECTED = 'TRUE' then CASE vnode_label
    WHEN 'EMPLOYEE INFO' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    vnode_label := 'Personal';
    WHEN 'REPORTS' then
    v_form_name :='HR_REPORTS';
    vnode_label := '';
    if id_null(Find_form(v_form_name)) then
    v_form_name := :global.application_path || v_form_name;
    open_form(v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);--,p_list);
    else
    go_form(v_form_name);
    end if;
    end if;
    end;
    Can anyone please help me? I don't want the user to double click. They should only click once.
    Thanks,
    Mercedes

    Right clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                       

  • Is it possible to create hierarchical tree report (not group tree) CR2008?

    Hi,
    Is it possible to create hierarchical tree kind report using CR 2008(no group tree in the report)?  The report somewhat look like below and a node can have multiple Child and so and so. Is there any magical way either as a chart or any object which supports the below structure.
                                                          Parent1
                                           Child1              Child2             Child3             Child4          Child5
                     Child1A     Child1B      Child1C
        Child1Aa  Child1Ab
    its hierarchical tree  structure and it should be in detail section of the report so that print in paper is possible.
    Please help first of all, can we able to create a report in above structure(each item needs to be surronuded with box and the each last child will contain a table valued data.
    (if I post this thread, it may look like plain text, please consider the above data as a hierarchical tree  structure with child having N number of children)
    Thanks

    Moved from .NET Development - Crystal Reports forum to Crystal Reports Design forum.
    Ludek

  • Hierarchical Tree not showing using a record group to populate

    Hi, I am trying to set up an hierarchical tree. Can someone please give me the exact steps I need to take to get this right.
    I am trying to create a hierarchical tree to behave like a menu on a Main form from where I will call the other forms of my application.
    I have done the following
    select 1, level, null, form_name, form_name
    from iso_forms
    connect by prior form_name=action
    start with action is null
    and get this when I run the statement in pl/sql
    1 LEVEL NULL FORM_NAME FORM_NAME
    1 1 Edit Edit
    1 2 Holder Holder
    1 2 Isotopes Isotopes
    1 2 Laboratories Laboratories
    1 2 Personal Personal
    1 2 Incident Incident
    1 2 Equipment Equipment
    1 2 Over Exposure Over Exposure
    1 2 Archive Archive
    1 1 Print Print
    1 1 Queries Queries
    My tree on my main form is still blank, I have checked that the tree is the only item in the block but I am not sure how to confirm that it is a control block. I created the tree in layout editor by clicking on the Hierarchical Tree icon on the left and then dragging out a block, so I am assuming that the block is of the correct type.
    Thank you for your assistance
    Michael

    a control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
    I suggest you create a procedure where you create the record_group using
    CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
    Here is my code that I i used to populate my tree .it works:
    PROCEDURE populate_the_tree IS
    grp recordgroup;
    error_number number;
    grpname varchar2(20) :='rg_group';
    tree_id item :=find_item('ctrl.tree');
    grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
    begin
         grp := find_group(grpname);
         if not id_null(grp)
              then delete_group(grp);
         end if;
    --     grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
         grp := create_group_from_query(grpname,grp_qry2);
         error_number:=populate_group(grpname);
         if error_number <> 0
              then message('Error while populating tree');
              raise form_trigger_failure;
         end if;
         ftree.set_tree_property(tree_id,ftree.record_group,grp);
    END;
    Message was edited by:
    lewismak2000

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • Hierarchical tree traversal..!!

    Hi all,
    I've populated a tree (Hierarchical tree - Ftree in Forms6i). Now I want to traverse it from the root node to the last nodes' last leaf....
    How can i achieve this...
    Please guide me through...
    Very urgent
    Thanx in advance...
    RK Raju

    a control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
    I suggest you create a procedure where you create the record_group using
    CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
    Here is my code that I i used to populate my tree .it works:
    PROCEDURE populate_the_tree IS
    grp recordgroup;
    error_number number;
    grpname varchar2(20) :='rg_group';
    tree_id item :=find_item('ctrl.tree');
    grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
    begin
         grp := find_group(grpname);
         if not id_null(grp)
              then delete_group(grp);
         end if;
    --     grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
         grp := create_group_from_query(grpname,grp_qry2);
         error_number:=populate_group(grpname);
         if error_number <> 0
              then message('Error while populating tree');
              raise form_trigger_failure;
         end if;
         ftree.set_tree_property(tree_id,ftree.record_group,grp);
    END;
    Message was edited by:
    lewismak2000

  • Hierarchical tree - Data Entry Form

    I am trying to make a data entry form for hierarchical tree. Any one help me to send a sample .fmb file.
    I created a table like
    create table master_ACTIVITY
    (INITIAL_LEVEL NUMBER (4) ,
    NODE_DEPTH NUMBER (4) ,
    NODE_LABEL VARCHAR2(160) ,
    NODE_ICON VARCHAR2(60) ,
    NODE_DATA VARCHAR2(160) ,
    NODE_PARENT VARCHAR2(160)
    1. How do i use hierarchical tree for adding and deleting item into it.
    2. In my other form i use the item from hierarchical tree. so how to get the return value of the selected item in a hierarchical tree. and which of filed in this table i need in other forms to connect to this table and get values.
    please send a sample form to [email protected]
    thank you
    saji daniel

    Andreas,
    It got worked.
    I have another problem now. I have 2000 records in my tree. when i populate it is taking time to populate.
    I want to display only parent trees ie Level 1 & 2 Items. But the Level 1 & 2 should have '+' symbol to display.
    When the user click on any items in level 2, only then the child of the selected parent should populate.
    By default all the items are displayed in collapsed mode (-1). But still it take time to populate.
    Any solution ?.

  • Hierarchical tree not showing

    Hi, My hierarchical tree is not showing on the form, I have the following situation;
    I have a table with the parent and child coloumns, I have created a Record_Group using a query that I have tested in PL/SQL it works
    select 1, level, form_name
    from iso_forms
    connect by prior form_name=action
    start with action is null
    The rsult is
    1 LEVEL FORM_NAME
    1 1 Edit
    1 2 Holder
    1 2 Isotopes
    1 2 Laboratories
    1 2 Personal
    1 2 Incident
    1 2 Equipment
    1 2 Over Exposure
    1 2 Archive
    1 1 Print
    1 1 Queries
    11 rows selected.
    I have set in the properties of the tree to use the Record_Group that has this query, but when I run the form I only see a blank square where the tree should be showing.
    Can anyone tell me what I am doing wrong?
    Thank you
    Michael

    a control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
    I suggest you create a procedure where you create the record_group using
    CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
    Here is my code that I i used to populate my tree .it works:
    PROCEDURE populate_the_tree IS
    grp recordgroup;
    error_number number;
    grpname varchar2(20) :='rg_group';
    tree_id item :=find_item('ctrl.tree');
    grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
    begin
         grp := find_group(grpname);
         if not id_null(grp)
              then delete_group(grp);
         end if;
    --     grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
         grp := create_group_from_query(grpname,grp_qry2);
         error_number:=populate_group(grpname);
         if error_number <> 0
              then message('Error while populating tree');
              raise form_trigger_failure;
         end if;
         ftree.set_tree_property(tree_id,ftree.record_group,grp);
    END;
    Message was edited by:
    lewismak2000

  • Hierarchical tree problem

    Hi,
    I have a hierarchical tree in one my forms that one branch of it has about 2000 nodes the hierarchical tree does not display all the values.
    I've tested with about 1500 and it show correctly.
    Any limitation? any workaround?
    regards

    Hi,
    Something like this:
    SCOTT@soti_9> CREATE TABLE Org(
      2    Org_Id INTEGER,
      3    Org_Name VARCHAR2(100),
      4    Parent_Org_Id INTEGER
      5  );
    Table created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(1, 'Org_1', NULL);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(2, 'Org_2', 1);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(3, 'Org_3', 2);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(4, 'Org_N', 2);
    1 row created.
    SCOTT@soti_9> COMMIT;
    Commit complete.
    SCOTT@soti_9> CREATE TABLE Members(
      2    User_Id INTEGER,
      3    Org_Id INTEGER
      4  );
    Table created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(1, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(2, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(3, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(4, 4);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(5, 4);
    1 row created.
    SCOTT@soti_9> COMMIT;
    Commit complete.
    SCOTT@soti_9> WITH Branches AS (
      2    SELECT Org_Id
      3    FROM Org
      4    START WITH Org_Name = 'Org_2'
      5    CONNECT BY PRIOR Org_Id = Parent_Org_Id
      6  )
      7  SELECT COUNT(*)
      8  FROM Branches B
      9    JOIN Members M USING(Org_Id)
    10  ;
      COUNT(*)
             5
    SCOTT@soti_9> WITH Branches AS (
      2    SELECT Org_Id
      3    FROM Org
      4    START WITH Org_Name = 'Org_1'
      5    CONNECT BY PRIOR Org_Id = Parent_Org_Id
      6  )
      7  SELECT COUNT(*)
      8  FROM Branches B
      9    JOIN Members M USING(Org_Id)
    10  ;
      COUNT(*)
             5Regards,
    Dima

Maybe you are looking for