Need Simple Hierarchical Tree Example

Can someone e-mail me a simple, working hierarchical tree example, along with what tables i need to insert into the database? Like the car/airplane example, or employee/department example.
I tried following the instructions in the Introduction to Hierarchical Tree example from metalink, but the tree still does not display on my form, even though the data query is valid. Nothing happens when i click the button.
I need this pretty urgently, so any help will be appreciated! Thanks! My e-mail is [email protected]

Thats what i don't understand, you see. There is no query error. I know when there is, because when i type the query wrongly, the error prompts. However, when the query is correct, nothing happens. When i go through in debug mode, it does enter the statement to populate the tree. This is my record group/data query(i tried putting it in both) :
SELECT initial_level
,node_depth
,node_label
,node_icon
,node_data
FROM MyTreeData
START WITH node_parent IS NULL
CONNECT BY node_parent = prior node_data
This is my populate tree code :
DECLARE
     htree ITEM;
     top_node FTREE.NODE;
     find_node FTREE.NODE;
BEGIN
     -- Find the tree itself.
     htree := FIND_ITEM('mytreeblock.mytree');
     -- Populate the tree with data.
     ftree.Populate_Tree(htree);
END;
This is the format of data in the database :
initial_level node_depth node_label node_icon node_data node_parent
-1 2 Car Null CAR TRANSPORT
-1 2 Plane Null PLANE TRANSPORT
0 2 Bike NULL BIKE TRANSPORT
1 1 Transport NULL TRANSPORT
0 3 Honda NULL HONDA CAR
0 3 Boeing 747 NULL 747-400 PLANE
0 3 Mazda NULL MAZDA CAR
I hope its not a problem with my Forms program, so i'm hoping that someone can e-mail me a working one to see. I've been reading up on this for a few days already, but i do not know why its not working.
Thanks for your help again, Kevin! I really appreciate it.

Similar Messages

  • Need a Hierarchical Tree-type library for Nodes

    Is there a good library out there (perhaps in java itself?) that will allow me to create Heirarchies of data using nodes? Kinda like C's glib GNode class maybe?
    In other words, I need to be able to make nodes, give them information, add them to parent nodes, add children to them, find nodes, get all nodes at a certain level, etc.
    Thanks for any pointers.

    Thanks, I'll take a look at this, but just to make sure I'm not missing out, does anyone know of any other implementations that are better than this? More optimized or something? (I gotta check all my options)

  • Simple XML DOM Example Needed.

    I need a simple XML DOM Example that reads in the XML and makes objects out of the elements. The tutorial from sun is very sketchy and seems to good far too quickly.
    Thanks,
    Dave.

    You can find some examples:
    http://java.sun.com/xml/jaxp/dist/1.0.1/examples/#building
    http://newinstance.com/writing/javaxml2/javaxml2_examples.html
    http://www.docuverse.com/domsdk/index.html#tutorial
    http://www.devx.com/sourcebank/search.asp

  • Request a Simple Sample of adding Hierarchical Tree Node

    Hai! if you are familiar with hierarchical tree. please show me
    some sample of adding node to the hierarchical tree(simple
    adding node)
    If you are providing code, please also provide information where
    the code am I suppose to be put cause i'm still new in oracle.
    Thanks in advance for spending some time on it...
    Eric :)
    null

    Here is the code for both the tree node selected and tree node activated triggers
    Tree Node Seleceted code:
    :CONTROL.Node_Activated := null ;
    :CONTROL.Node_Selected := Ftree.Get_Tree_Node_Property('CONTROL_TREE.MENU', :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE) ;
    ===========================================================
    Tree Node Activated code:
    Declare
    LN$I Pls_integer ;
    Begin
    :CONTROL.Node_Selected := null;
    :CONTROL.Node_Activated := Ftree.Get_Tree_Node_Property('CONTROL_TREE.MENU', :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE) ;
    If :CONTROL.Node_Activated IS NOT NULL Then
    if :GLOBAL.curr_proc_id <> :control.node_activated or :control.node_activated
    is null then                          
    CALL_FORM(:CONTROL.Node_Activated);     
    else
    Set_Alert_Property( 'AL_FORM_OPENED', ALERT_MESSAGE_TEXT,
    :CONTROL.Node_Activated || ' is already opened. Please check your current or previously opened library.' );
    LN$I := Show_Alert( 'AL_FORM_OPENED' ) ;
    end if;          
    end if ;
    end ;

  • New developer with spacial - need simple example

    Dear All
    i developing an application that need to store coordinates which represented with 3 floats. i need simple demo which illustrates me how can i insert such coordinate using Oracle Spatial and the how to select it. i also need little explanation of the structure of the select and insert queries
    Thanks alot

    Well, Ron, I think you will need to read a minimum in order to use oracle spatial. I admit that the Oracle docset can seem daunting, but I don't think you can use it without at least reading some of the Oracle Spatial Users Guide, available here (file://localhost/D:/Doc/Oracle/1020/B19306_01/appdev.102/b14255/toc.htm) in HTML and PDF.
    I suggest reading at least chapters 1 (concepts) and 2 (data types) in this manual.
    Albert

  • 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!

  • How do we create Hierarchical tree??

    Can I get help on creating hirerchical tree with detailed description ?? I tried basing hierarchical item on query but it didn't work.Do i need to specifically give code for populating it ??
    Also I need help on basing it on Record Group ??
    Is there any rule for having specific no of columns for a tree ??

    You can create Hierarchical Tree in two ways.
    One using "connect by prior" and another
    by Adding columns and row to record group at run time.
    If your table has Self reference Key then
    you can create using connect by prior.
    Otherwise you have to go for second one.
    Go and check the navwiz.fmb in oracle demo files.
    Following example is from navwiz.fmb
    (open navwiz.pll and then check refresh_tree)
    In this example they used both.For Emp they used connect by prior.
    PROCEDURE refresh_trees(p_view VARCHAR2) IS
    cursor cursor_dept is
    select dname, deptno
    from dept
    order by dname;
    cursor cursor_emp(p_dno number) is
    select ename, empno
    from emp
    where deptno = p_dno
    order by ename;
    v_i number;
    v_ignore number;
    rg_emps recordgroup;
    rg_depts recordgroup;
    v_init_state groupcolumn;
    v_level groupcolumn;
    v_label groupcolumn;
    v_icon groupcolumn;
    v_value groupcolumn;
    begin
    if p_view = 'EMP' then
    --the emps hierarchy
    rg_emps := find_group('EMPS');
    if not id_null(rg_emps) then
    delete_group(rg_emps);
    end if;
    rg_emps := create_group_from_query('EMPS',
    'select 1, level, ename, NULL, to_char(empno) ' &#0124; &#0124;
    'from emp ' &#0124; &#0124;
    'connect by prior empno = mgr ' &#0124; &#0124;
    'start with mgr IS NULL');
    v_ignore := populate_group(rg_emps);
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_emps);
    else
    --the organization
    rg_depts := find_group('DEPTS');
    if not id_null(rg_depts) then
    delete_group(rg_depts);
    end if;
    rg_depts := create_group('DEPTS');
    v_init_state := add_group_column(rg_depts, 'init_state', number_column);
    v_level := add_group_column(rg_depts, 'level', number_column);
    v_label := add_group_column(rg_depts, 'label', char_column, 40);
    v_icon := add_group_column(rg_depts, 'icon', char_column, 20);
    v_value := add_group_column(rg_depts, 'value', char_column, 5);
    v_i := 1;
    for deptrec in cursor_dept loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 1);
    set_group_char_cell (v_label , v_i, deptrec.dname);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(deptrec.deptno));
    v_i := v_i + 1;
    for emprec in cursor_emp(deptrec.deptno) loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 2);
    set_group_char_cell (v_label , v_i, emprec.ename);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(emprec.empno));
    v_i := v_i + 1;
    end loop;
    end loop;
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_depts);
    end if;
    My query******
    procedure refresh1 is
    v_i number;
    v_ignore number;
    Rg_Menus recordgroup;
    rg_depts recordgroup;
    Begin
    Rg_Menus := find_group('MENUS');
    If not id_null(Rg_Menus) then
    delete_group(Rg_Menus);
    End If;
    Rg_Menus := create_group_from_query('MENUS',
    'select 1, level, item_name, NULL, item_id ' &#0124; &#0124;
    'from Item_all '
    &#0124; &#0124;' where Item_id in (select Item_id from Item_access_all where role_id in
    (select role_id from org_access_all where user_id =
    (select gsp_user_id from users_all where upper(user_name) = upper(USER))
    and code = :global.code) )
    and item_id not in (select item_id from item_Exception where Code = :Global.Code)' &#0124; &#0124;
    'connect by prior item_name = main_name ' &#0124; &#0124;
    'start with item_name = ''MAIN''');
    v_ignore := populate_group(Rg_Menus);
    ftree.set_tree_property('tree_blk.tree_menu', ftree.record_group,Rg_Menus);
    Exception
    When Others then
    Bell;
    Message('You cannot Access any menu item...');
    Raise Form_trigger_Failure;
    End;
    viji.
    null

  • 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

  • How to Create a SIMPLE Flex Tree?

    Hi,
    Okay Im pretty new to flex and i have a uni assignment where
    i need to use it.
    A tree list would be perfect for one part of the site,
    otherwise it would have heaps and heaps of links.
    I want a tree that has four clickable parents (nodes) and
    then inside each parent i want 14 leafs. When a leaf is clicked on
    i want an image and some text to appear next to it.
    Similar to the tree example in the Adobe Flex Explorer -
    http://examples.adobe.com/flex3/componentexplorer/explorer.html
    While i can figure out how they are creating the tree, and
    naming the nodes etc, i don't' know how to edit it to display and
    image and content into the right side box?
    If someone could tell me, explain it, or has source code to a
    simple example that would be awesome!
    Thanks in advance,
    Tara

    hey thanks for replying. i eventually found a tute of what i
    wanted and got it all working. didn't realize how easy xml is lol
    ^-^
    would you be able to help me with something else though? i
    posted another topic just above.
    what i want to do (this is separate form the tree) is have
    one image and when i click on it have it change to another image.
    essentially it will be the back of a playing card and then
    when it's clicked on it will swap to the front of the image card.
    so i have a back image and a front image. how can i swap
    them?

  • Can i have a check box in the hierarchical tree in the icons place, urgent!!! please

    Hi,
    I'am working on the Hierarchical Tree structure which should have three levels, I need to have a check box in the place of the icon & if i select a node that node & the child nodes should get selected.
    After this when i say move selected ( i'am trying to use picklist class also) the entire checked tree has to move to the display area to the right & should display as tree structure & after this if i save then the checked records which are moved to another text area should get saved!!
    How to achieve this? I have the tree structure ready but the check box part is the worrying factor! & then moving the checked records to the right using picklist class is the second problem & finally saving records to database.
    Any help in this regard will be deeply appreciated:)
    If check box is not possible then i will have to look at other methods, will the tree structure allow checkboxes????
    Thanks
    Mahesh

    No the tree will not allow checkboxes

  • How to go to a particular node in a hierarchical tree?

    I want to do this simple thing with a Forms hierarchical tree.
    Since tree has lots of levels and branches I want to give a search box.
    User types the label and press a button. The form then has to query the tree node and expand ONLY the path where the node is (if found) and highlight it. If a node with a label is NOT found I give an error message to the user.
    I got hold of a code segment to explode a tree and modified it, but it does not work. The entire tree is expanded and you don't know where you are.
    Any help will be greatly appreciated?
    PROCEDURE Expand_All_Nodes_in_Tree IS
         node ftree.node;
         htree ITEM;
         state varchar2(30);
    BEGIN
         -- Search the tree identifiant --
         htree := Find_Item('menu.tree');
         -- Search the root --
         node := Ftree.Find_Tree_Node(htree, '');
         -- Expand all nodes --
         WHILE NOT Ftree.ID_NULL(node) LOOP
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
         IF state = Ftree.COLLAPSED_NODE THEN
         Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE);
         END IF;
         node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node);
    IF Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_LABEL) = :ctrl.node_lable_to_search THEN
    EXIT;
    END IF;     
         END LOOP;
    END;

    Hi Channa,
    Try this code with you tree i am using the same situation and this code is working perfect with me.
    PROCEDURE find_node_in_tree(search_string varchar2, find_type varchar2) IS
    htree ITEM;
    search_start_node ftree.node;
    find_node ftree.node;
    BEGIN
    htree := Find_Item('blk_tree.main_tree');
         search_start_node := nvl(ftree.get_tree_selection(htree,1),ftree.root_node);
         find_node := ftree.find_tree_node(htree,upper(search_string)||'%',ftree.find_next,ftree.node_label,ftree.root_node,search_start_node-1);
         if find_node = 0 then
              find_node := 1;
    end if;
    Ftree.Set_Tree_selection(htree, find_node, Ftree.SELECT_ON);
    exception
         when others then
              NULL;
    END;
    -Ammad

  • URGENT *** Hierarchical Tree in Forms 9i *** URGENT

    Hello everybody,
    for my company I need to build a hierarchical tree item, that will display static data over three levels. Let's say: departments, employees and employee projects.
    How do I fill the Item?
    When do I fill the Item?
    Where do I fill the Item?
    What are the elements of the SQL query, that fills the hierarchical tree?
    Any help will be appreciated
    [email protected]

    Note:210663.1 helped a bit.
    I used the database column as the third element in the select part and put NULL as the fifth element. Then it worked.
    Now I am looking for the way to add the employees, when the user selects / activates a department node.

  • 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

  • How to create  a very simple dyamic tree with rich faces

    hi i have spent more than 5 days trying to make a very simple rich faces tree but with no result
    i want to make a very simple dyamic tree
    for example i have a button when i click it.i want to add two nodes in my tree("node 1" and "node 2")
    i have also failed in making even a static tree with richfaces i think that some thing is wrong with them i checked the live demo website
    http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree
    i have tried the source code but with no result :(
    thank you

    You can try something like this
    <rich:tree switchType="server" >
    <rich:treeNodesAdaptor nodes="#{CB.calendarioHandler.organizacion.departamentos}"
    var="departamento">
    <rich:treeNode>
    <h:outputText value="#{departamento.nombre}"/>
    </rich:treeNode>
    <rich:treeNodesAdaptor nodes="#{departamento.empleados}"
    var="empleado">
    <rich:treeNode>
    <h:outputText value="#{empleado.nombre}"/>
    </rich:treeNode>
    <rich:treeNodesAdaptor nodes="#{empleado.calendarios}"
    var="calendario">
    <rich:treeNode>
    <h:outputText value="#{calendario.nombre}"/>
    </rich:treeNode>
    </rich:treeNodesAdaptor>
    </rich:treeNodesAdaptor>
    </rich:treeNodesAdaptor>
    </rich:tree>
    where departamentos, empleados and calendarios are just simple pojos lists.
    I hope to help.
    Edited by: sfdgd on Apr 1, 2009 6:40 PM

  • I need Lookup in XI example and some documentation...........

    Hi
    I need simple example of LOOKUP in XI from scratch and some documentation on lookup... why its used? what is the advantages of look up ? In what situations its usefull? please send me the documentation to my mail id if any one have.....
    my mail id..... <b>[email protected]</b>
    Thanks nad Regards
    Ravi Shankar B

    have a look at these blogs on lookups;
    DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Also read thru this to get more idea on lookups - http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm

Maybe you are looking for

  • A6430f Pavilion, Turn into Boat Anchor, help

    First off here are my system spec's: It's an HP Pavilion a6430f OS Name Microsoft® Windows Vista™ Home Premium Version 6.0.6001 Service Pack 1 Build 6001 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Name LINNEA-PC S

  • Blue Screen (STOP: 0x00000050) when using multiple Agilent34970A devices with a single GPIB

    Hi, I am using two test fixtures that contain two Agilent34970A Multimeters and two Sorensen Power Supplies (each test fixture is contaning one Multimeter and one Sorensen Power Supply) that are connected via GPIB cables to a single PCI-GPIB card. Be

  • House Bank Address Not In Transport

    Hi SAP Gurus, We added a new house bank in FBZP and entered all the necessary info, cocode, house bank, bank country, bank key, swift code, address, etc. However, when we moved the config to QA, the bank address is missing in the config that made it

  • What does "tradedoubler" actually do?

    Every time I click on a link that opens the App store on my iPhone - for instance, in one of those "free apps" applications, it goes via Safari. In that short moment that the Safari window floats by, I can see that it goes to a "tradedoubler" link. I

  • Installing Drivers for Photosmart B109a-m on a Windows 8.1 laptop

    I have tried installing the drivers for a Photosmart B109a-m Printer/Scanner using the HP wizard. The software is downloaded OK however when I click the instal button on the installer I get a message "system cannot find the file specified". This ques