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 ;

Similar Messages

  • 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

  • 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

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

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

  • 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

  • Add tree node problem

    Hi guys, I'm trying to add nodes programatically but I have the same wrong behavior:
    1. I displayed a tree which will be updated from a data block and Selected say NODE1.
    2. After I displayed it I EXECUTE QUERY on the DATA BLOCK next to it, so I can choose a candidate record to belong to the tree structure.
    3. I add the record via a button which has the addMyNode code.
    4. It adds the node correctly. (say NODE11).
    5. I add another node just behind the new node (NODE11) say NODE 111.
    6. With my mouse I selected the father(NODE1) of NODE11 and add a brother of NODE 11, say NODE12, but this node is added next to NODE111.
    7. If I navigate a little while through the tree after step number 5, and then return to NODE1 with my mouse, I can add it perfectly.
    What's wrong with my code:??
    AddMyNode (in a PushButton):
    PROCEDURE AddMyNode IS
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE;
    item_value VARCHAR2(120);
    num_selected NUMBER;
    current_node FTREE.NODE;
    ncl_centro      NUMBER;
    BEGIN
    htree := Find_Item('DB_ARBOL.HT_ARBOL');
    num_selected := Ftree.Get_Tree_Property(htree, Ftree.SELECTION_COUNT);
    FOR j IN 1..num_selected LOOP
    current_node := Ftree.Get_Tree_Selection(htree, j); Long postings are being truncated to ~1 kB at this time.

    Hi guys, I'm trying to add nodes programatically but I have the same wrong behavior:
    1. I displayed a tree which will be updated from a data block and Selected say NODE1.
    2. After I displayed it I EXECUTE QUERY on the DATA BLOCK next to it, so I can choose a candidate record to belong to the tree structure.
    3. I add the record via a button which has the addMyNode code.
    4. It adds the node correctly. (say NODE11).
    5. I add another node just behind the new node (NODE11) say NODE 111.
    6. With my mouse I selected the father(NODE1) of NODE11 and add a brother of NODE 11, say NODE12, but this node is added next to NODE111.
    7. If I navigate a little while through the tree after step number 5, and then return to NODE1 with my mouse, I can add it perfectly.
    What's wrong with my code:??
    AddMyNode (in a PushButton):
    PROCEDURE AddMyNode IS
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE;
    item_value VARCHAR2(120);
    num_selected NUMBER;
    current_node FTREE.NODE;
    ncl_centro      NUMBER;
    BEGIN
    htree := Find_Item('DB_ARBOL.HT_ARBOL');
    num_selected := Ftree.Get_Tree_Property(htree, Ftree.SELECTION_COUNT);
    FOR j IN 1..num_selected LOOP
    current_node := Ftree.Get_Tree_Selection(htree, j); Long postings are being truncated to ~1 kB at this time.

  • 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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                       

  • Hierarchical tree with iconic nodes

    hi i'm using database - 10g, developer suite - 10g; created a hierarchical tree and the icons are displaying along side the nodes when they are being selected or activated.
    problem - i've stored the icons in g:\ICONS (all gif icons). but when i run the form it is picking up the icons from the following location - C:\Documents and Settings\development\Oracle Jar Cache\frmall_jinit.jar-63ace618-1160d49b\oracle\forms\icons. I've a button in the same form and the icon showing on it is from the location G:\ICONS(as desired); but in case of tree it's from the location which is not desirable.
    any help.

    Hello,
    You need to change the imagebase parameter to be documentbase instead of codebase.
    When imagebase is set to codebase forms looks for Images in the jar files and then in the absolute path, otherwise it check direct path.
    For details in deploying the Images please check:
    http://docs.oracle.com/cd/B14099_19/web.1012/b14032/configure009.htm
    Clear the Java cache and browser cache after the above changes!
    Regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly!

  • Hierarchical Tree: When-Tree-Node-Activated is not working

    I'm working Forms 10G rel.2.1 and also using application server 10G 2.
    my problem is in Hierarchical Tree [When-Tree-Node-Activated] is not working in Enter this is working in Enter+Tab
    I want to this trigger is working in only Enter.
    I'm waiting quick response

    node_value is only item which have transfer the form or report name
    Trigger Name : WHEN-TREE-NODE-ACTIVATED
    Declare      
         htree                Item ;
    Begin
         --clear_values;
    --           htree := Find_Item('tree.htree');
    -- Find the value of the node clicked on.
    :node_value := ftree.Get_Tree_Node_Property(htree, :SYSTEM.trigger_NODE, Ftree.NODE_VALUE);
    ----Above node value transfer the procedure and call the form with node_value(Form Name)
         Execute_CMD_PROC;
    Exception
         When Others Then Null;
    End ;
    when i enter then no value but when i enter+tab then show the form

  • How to make a node of a Hierarchical Tree BOLD

    When we click the node of a Hierarchical Tree, we want to make the node BOLD. We tried using set item property but it's not working.

    There aren't really any built-ins that will allow you to change the Font Weight of the Tree Node Label. You might be able to accomplish this with Java, but you would have to write your own Java Bean to implement. It might be easier to simply add an Asterisk (*) to the label programatically using the Set-Tree-Node-Property() built-in, but this presents problems with removing the asterisk when you leave the selected node or select a new node. It can be resolved, but you'll have to record all the information you'll need to reset the node - namly just the Node_ID.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 24, 2012 7:52 AM

  • JTreeTable problem editing tree node

    Hi,
    Iam using the swing JTreeTable component and facing a problem. Iam displaying hierarchical data in the JTreeTable. Now I would like to provide the facility to edit a tree node. I have a TreeSelectionListener registered on the tree and a TreeModelListener registered on the DefaultTreeModel. Wheneve, I start editing a node by double clicking it the valueChanged method is called but I do not see the new value the user types in this method. I have another method setValueAt which is where I can see the new value the user has entered.
    I can set this new value to the treenode using
        node.setUserObject(newValue);However, if I do this, the next time I try to edit the same node, the editor component is painted over the tree node thus displaying an empty textfield that occupies the entire cell.
    How can I make the editor appear above the tree node with the contents loaded in it always.
    Any help is appreciated.
    cheers,
    vidyut

    You bind a mouselistener to the tree, so it has to be handled there.
    When clicking once (method should be "mouseReleased" or something, treenodes name (toString) should be .setText("");
    regards
    marco

Maybe you are looking for