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 ;

Similar Messages

  • How to set the control-on hierarchical tree nodes

    Hi,
    I have created form in which at the left it has hierarchical tree structure(BOM) and towards the right it brings up the query results for selected node.
    Now, I have a button upon clicking which I navigate to the root node by issuing
    "Ftree.set_Tree_selection(htree, 1, Ftree.select_on);".
    But, it cannot automatically run the ' when-tree-node-selected' trigger '.
    any solution???
    Its really urgent.I have a customer demo on monday.
    Please help me asap.
    regards,
    Nagadeep.

    Hello Nagadeep,
    couldn't you just put the code from the trigger into a procedure
    and run that after the navigation to the item?
    Just a thought,
    Bernd
    The docs state that:
    No programmatic action will cause the When-Tree-Node-Selected trigger to fire. Only end-user action will generate an event.
    Probably due to performance reasons.
    Bernd
    Message was edited by:
    Bernd Prechtl

  • Call forms and reports from a hierarchical tree node.

    Hello,
    I am new in pl/sql programming and I have some dificulties. I have created a hierarchical tree, in order to use it as a menu in an application that I am trying to develope. The problem is that I do not know how can I make the last nodes to be either a form or a report and when somebody double clicks on these nodes the form or the report will run. What is more, should I use the when-tree-node-selected trigger or the when-tree-node-activated?
    Thank you in advance,
    Vag

    Hi ,
    In Oracle Forms , a hierarchical tree is developed through the use of a sql statement and column which defines the order of leaves...
    Visit the on-line help of Forms10g to find out the details , and the triggers as well...
    Something else...post this question to Oracle Forms to get more detailed answer...
    Regards,
    Simon

  • Call forms and reports through a hierarchical tree node.

    Hello,
    I am new in pl/sql programming and I have some dificulties. I have created a hierarchical tree, in order to use it as a menu in an application that I am trying to develope. The problem is that I do not know how can I make the last nodes to be either a form or a report and when somebody double clicks on these nodes the form or the report will run. What is more, should I use the when-tree-node-selected trigger or the when-tree-node-activated? I use forms 6i.
    Thank you in advance,
    Vag
    Message was edited by:
    user537672

    Thank you very much for your reply. I tried what you said and managed to create a when-tree-node-activated trigger that works fine. The only problem is that I do not know how to find the last 3 characters of every node in order to make the form understand if it is a form or a report. I mean that the name of each node maybe of different length so I do not know how exactly to use the substr().
    Thank you
    Vag

  • Hierarchical Tree Node icon ?

    Hi
    How to create a icon on Hierarchical tree
    Regards
    Shahzaib

    Thanks for your reply and i am sorry for not clear my developer version
    My developer version is 6I
    Database express addition
    Well i write the trigger when tree node activate
    :parameter.current_emp := ftree.get_tree_node_property(find_item('Block28.Tree8'),
                                                          :system.trigger_node,
                                                          ftree.node_value);
    DECLARE
    htree         ITEM;
    current_node  FTREE.NODE;
    find_node     FTREE.NODE;
    BEGIN
    htree := Find_Item('block28.tree8');
    find_node := :SYSTEM.TRIGGER_NODE;
    ftree.set_tree_node_property(htree, find_node, ftree.NODE_ICON, 'D:\ico\Ico\favorite.ico');
    END;
    Ftree.SET_tree_NODE_PROPERTY(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_ICON, 'print');And also when mouse double click
    declare
    al_button number;     
         pl_id ParamList;
         v_emp_id     number;
         e_child_rec  exception;
         pragma exception_init(e_child_rec, -02292);
         len number := 3; --variable which tells till what length from last not to copy from first string
    begin
         v_emp_id := ftree.get_tree_node_property(find_item('Block28.tree8'),
                                                               :system.trigger_node,
                                                                ftree.node_value);
    SET_BLOCK_PROPERTY('block3', DEFAULT_WHERE, 'acc_id = ''' || V_emp_id|| '''');
    go_block('block3');
    EXECUTE_QUERY;
    exception
           when e_child_rec then
                Message ('Go Kimi Go');
    end;
      Now when i double click the mouse its show tree icon
    I want when i run my module its show me all node icon
    Hope this time i clear my question
    Regards
    Shahzaib ismail

  • Hierarchical Tree Node Attributes

    Hi,
    I know that Oracle' official answer to this is no, but is there a way to specify attributes for specific nodes in a hierarchical tree? I would like to display specific nodes in bold and specific nodes in a different color.
    Any idea welcomed.
    Monica

    If this were possible then you would have to use the FTree package and probably the FTree.Set_Tree_Node_Property procedure, so check those in the help system. But I'm 99.99% sure you'd be wasting your time.
    You might be able to do it with a JTree in a bean (it looks like it's not possible to extend an htree item in a pjc) but in forms the best you can do is assign icons to the nodes.

  • Hierarchical tree node problem

    Hi all --
    Today's problem is (drum roll)............
    My application uses a heirarichal tree where each tree node contains the name of a form within this system. The user can navigate from form to form by clicking the appropriatetly name tree node. This seems to work - sometimes. Some users click on a node for one form, but get transferred to another named form(usually the one above or below the one actually activated). I've also found out that this happens ONLY when the user has their screen resolution set to 800 x 600. This application was developed at screen resolution 1024 x 768 and it woks fine. Anybody know why??

    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 ;

  • Hierarchical tree node editable

    hi,
    is there a property to make a tree node label editable? it would be kind to click on the label, change it and save to DB, instead of copying its value into a text field.
    thanks

    Not directly as Andreas said but alternately you can do by
    You can set the label of NODE and update into the BASE table block and re-populate the tree
    - on Double click the label call custom Stack canvas contains new label in text item and user will press OK
    - Sets the Label of the Tree node
    - Update the new label to the base table block
    - Commit and re-populate the tree
    if responses are helpful or correct please mark it
    Baig,
    http://baigsorcl.blogspot.com

  • Hierarchical Tree Insert

    Hi All Is it possible to insert values into another table using hierarchical Tree Node values.Please give Methods
    Regards
    R.MaheshBabu

    hi
    try something like this.
    when-new-form-instance trigger.
    declare
         cursor dept_cur is
         select deptno , dname
         from   dept;
         cursor emp_cur (N number) is
         Select empno , ename
         from   emp
         where  deptno=N;
         Htree     item;
      parent_node varchar2(200);
      child_node  varchar2(200);
    begin
         Htree:=Find_item('tree');
         For dept_R in Dept_cur loop
    parent_node:=Ftree.Add_Tree_Node(htree,
    Ftree.ROOT_NODE,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    dept_r.deptno||' '||dept_r.dname,
    'insrec',
    dept_r.deptno);
         Htree:=Find_item('tree');
         For emp_R in emp_cur(dept_r.deptno) loop
    child_node:=Ftree.Add_Tree_Node(htree,
    parent_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    emp_r.empno||' '||emp_r.ename,
    'insrec',
    emp_r.empno);
    end loop;
    end loop;
    end;create tree and use this trigger for it.
    when-tree-node-selected trigger.
    declare
         Value_node  varchar2(50);
         htree  item;
    begin
         htree:=find_item('tree');
         Value_node := Ftree.GET_TREE_NODE_PROPERTY(htree,
                                            :system.trigger_node,
                                            Ftree.node_value);
         :val_from_tree:=value_node;
         set_block_property('emp',default_where,'empno='||:val_from_tree);
         go_block('emp');
         execute_query;
    end;create 3 blocks.
    1.control(Tree Block)
    2.emp (Table Block)
    3.value(create a item,named "VAL_FROM_TREE").
    i hope it will help u.
    sarah

  • Queue for Binary Tree Node

    I need to create a simple Queue class for Binary Tree Node. The class consist of only enqueue and dequeue, I cannot use the Collection Interface though. But I have no idea how to do it. Below is my Binary Tree Node Class.
    public class BTNode {
         private customer     item;
         private BTNode     left;
         private BTNode     right;
         public BTNode() {// constructor
              item = null;
              left = right = null;
         public BTNode(customer newItem) {// constructor
              item = newItem.clone();
              left = right = null;
         public void setItem(customer newItem) {// set methods
              item = newItem.clone();
         public void setLeft(BTNode newLeft) {
              left = newLeft;
         public void setRight(BTNode newRight) {
              right = newRight;
         public customer getItem() {     // get methods
              return item;
         public BTNode getLeft() {
              return left;
         public BTNode getRight() {
              return right;
    public class Queue1 extends BTNode {
        public Queue1() {
            super();
        public void enqueue(BTNode newItem) {
        public void dequeue() {
    }

    public class Queue1 extends BTNode {Why do you think that the queue should extend BTNode?
    You probably want to aggregate a List.
    Kaj

  • Create Maintenance Request - Simple Sample provided by SAP

    Hi!
    I'm testing Create Maintenance Request Sample at
    [Create Maintenance Request, Simple sample|http://esworkplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DE0426DD9B0249F19515001A64D3F462&id=A644A34757114FBEBB64A28BB7ABE2BF]
    In the "Resources" section of this page I press  "Run this sample" and at the first step (Enter data), when I press 'Next' with the default Equipment (10000461) I get the following errors:
    1 - Backend function, IndividualMaterialByIDQueryResponse_In.IndividualMaterialByIDQueryResponse_In not found
    2 - Error occured while executing the service: null
    I can see the Equipment 10000461 in the SAP ES Workspace ( ERP 6.0 - System ID: HU2,  TCode: IE03)
    Thanks for your help,
    Best Regards,
    Carlos Duarte

    HI,
    I have the same issue with other Simple Sample apps.
    Kind regards,
    Maxat

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

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

Maybe you are looking for