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

Similar Messages

  • Hierarchical Tree : Problem with lost Focus

    Forms 6i:
    I have a form with a hierarchical tree.
    The focus is on the tree.
    Now I go into word or an other application. After that I change back to forms.
    Now I cannot go into other blocks via mouse. In case, that I click in those records or blocks, I see the focus going into the record and directly going back to the tree-item.
    That means, I lose my mouse in tree-forms after changing the windows applications.
    Who knows a workaround ?
    Gerd

    The below given code which only accepts integers + you can not copy and paste
    anything in it other than integers.
    It also sets the maximum length for a JTextField
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    public class maxLengthText extends PlainDocument
    int maxVal=0;
    public maxLengthText(int maxLength)
    maxVal = maxLength;
    public void insertString(int offset, String str, AttributeSet a)
    throws BadLocationException
    if (getLength() + str.length() > maxVal)
    return;
    else
    try
    if(!Double.isNaN(Double.parseDouble(str)))
    super.insertString(offset, str, a);
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Numbers Only","TextField",1,new ImageIcon("Images/warnDel.gif"));
    offset=0;
    public static void main(String[] args)
    Document doc = new maxLengthText(5); // set maximum length to 5
    JTextField txtInt= new JTextField(doc, "", 6);
    JPanel panel = new JPanel();
    panel.add(txtInt);
    JFrame frame = new JFrame("My TextField");
    frame.setContentPane(panel);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(160, 80);
    frame.setVisible(true);
    }

  • Problem with Pre-Popup-Menu in Hierarchical Tree

    Hi,
    In Forms 10g I have made an application with an Hierarchical Tree. All works well, except the use of the Pre-Popup-Menu trigger.
    In that trigger when I read the values of Node_Label and Node_Value I get the values of the previous selected node, not the values of the node on which I issue the right mouse click. So, it seems that by clicking the node I need is not selected.
    Does anyone have any clues to solve this problem?
    Thanks in advance.

    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                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problems with right click in hierarchical tree

    Hi,
    I create a popup menu in a hierarchical tree and want to call this referencing to a node in the tree.
    I can get the node in GET_TREE_NODE_SELECTION but the node need to be selected for this...
    How can I select a node with a right click?? and then call the popup menu??
    Am I clear??
    Why the trigger MOUSE_CLICK doesn't works for right clicks??? I know about the SYSTEM.MOUSE_BUTTON_PRESSED but to use this I need a RIGHT_CLICK_TRIGGER... that I don't know how to call...
    thanks!

    Hi,
    This is a bug(96289), the same as the Base bug 1477977 which has NOT been fixed in Release 9.0.2 (as Oracle anounced) or in any earlier releases.
    Bug 1477977 was currently scheduled for the 1st patchset of Forms 9.0.4
    I don't know if it was fixed. Contact Oracle about that.
    Right now, to achive what you want you must left click to select a node. This means that the use must do a left click and a right click to have an item selected.
    Monica

  • 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

  • Hierarchical Tree error - fighting for over a year

    For over a year now, our Oracle forms have presented an elusive problem with Hierarchical Trees. First some core information:
    We are running Developer 6i, patchset 8, on a Sun host and an Oracle 8i database. Our forms are deployed over the web on the
    Oracle Application Server using J-Initiator 1.1.7.27.
    Now, only on our Production platform, and only during busy times of the day, we randomly get the error "Invalid Query for Hierarchical
    Tree" when one of our tree-based forms populates the tree. This error is sometimes followed by the infamous
    FRM-92100 "connection has been terminated" error. This happens whether building the tree with a single Selec and Populate Treet,
    or via a systematic series of Add Tree Node calls.
    We have tried rebuilding the form logic to eliminate form corruption, (form corruption - happens if you open a large FMB in the
    forms developer without first being connected to the database, manifests itself as random and odd form behaviour,
    or FRM-92100 errors, Oracle product support denies it really happens), we have added debug code, we've even tried generating
    the FMX on the Production platform as part of our deployment (normally we generate FMX files on our Integration platform
    which mirrors Production).
    We are not scheduled to upgrade for Forms 9i and the 9IAS for several more months, so upgrading isn't an immediate option for us.
    Any and all ideas welcome.
    Jeff Cline

    Hi Nigel,
    Two questions:
    1. When the publisher sends the access permission to the subcriber by:
    netStream.send("|RtmpSampleAccess", true, true)
    , on the subscriber side, what event or function can handle the guaranteed receipt of the access permission? Currently it is possible to draw the incoming stream video upon receiving NetStream.Play.Star and waiting for 5 seconds or so:
    public class MyWebcamSubscriber extends WebcamSubscriber {
    override protected function layoutCameraStreams():void
    // trying the event listener seems to work here.
    _streamManager.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
    override protected function onNetStatus(e:NetStatusEvent):void
    super.onNetStatus(e);
    case "NetStream.Play.Start":
    setTimeout(function():void {
    // draw the video from the incoming stream here.
    }, 5000);
    The questions is, which event can let the subscriber know that it has the access permission to the video stream?
    2. In WebcamPublisher, why is that the access permission is sent 3 times?
    a. Once on receiving NetStream.Connect.Success with 0.5 second delay, as in below.
    b. Once immediately upon receiving NetStream.Connect.Success, as in below.
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    c. Once in onConnectionTypeChange() with 2 seconds delay:
    protected function onConnectionTypeChange(p_evt:StreamEvent):void
    if ( _streamManager.isP2P) {
    _stream= new NetStream(_connectSession.sessionInternals.session_internal::connection as NetConnection,NetStream.DIRECT_CONNECTIONS);
    setTimeout(sendSnapShotPermission, 2000);

  • Can I use Hierarchical Tree from Forms6.0 in Forms5.0

    Hello
    The Oracle Custumer Support tell me that it should be possible to
    use Hierarchical Trees also in Forms5.0
    I look for a possibility to build a Navigator in Forms5.0
    with Symbols. (look and feel like the Navigator in Forms6.0 if I
    use Symbols in the Record Group).
    I Description should be on
    http://developer.us.oracle.com
    but either i have no access to this side or
    the URL is false.
    Sure is that there is a description over this Problem.
    And i have to get this description ;-)))
    Thanks for Help
    JK
    null

    That is not recommended. The new code editing features do not play well with an old workspace.
    Please create a new workspace and import your projects into that.
    -Anirudh

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

  • Hierarchical tree item - how to improve performance

    I'm loading hierarchical tree item with query.
    Problem is that it takes very long to load all the items(300, but can be more) to the hierarchical item.
    Query takes 0.5 sec., but loading it into the item with Set_Tree_Property(htree, Ftree.RECORD_GROUP
    the code:
    PL1 := Create_Group_From_Query('pl1', query);
    v_ignore := Populate_Group(PL1); -- 0.5 sec
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, PL1); -- 3 sec.
    Does anyone have any idea what to do to improve tree loading?

    Hello,
    try to play a little bit with the state-column of your query. If you only display the first hierarchy level
    and set the state of the "hidden" nodes to open, I think ist is the state 1, then it works much faster.
    cu
    Matthias M|ller

  • Error 7343 when delete a recordin database and hierarchical tree

    I got this error after delete a record and call the procedure to refresh the hierarchical tree.
    This is my code:
    PROCEDURE LOAD_TREE IS
    htree ITEM;
    rg_id RecordGroup;
    errcode number;
    BEGIN
    rg_id := find_group('RECORD_GROUP_POPULA_TREE');
    errcode := populate_group(rg_id);
    -- Find the tree itself.
    htree := Find_Item('HIERARCHICAL_TREE.TREE');
    -- Populate the tree with data.
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, rg_id);
    END;
    I put a code at the trigger KEY-COMMIT to refresh the hierarchical tree always the button F10 is pressed. Look:
    begin
    commit;
    LOAD_TREE;
    end;
    When I insert records that´s ok...the problem is when I delete records.
    Thanks!
    Sabrina

    I found the solution after read this thread: Hierachical tree delete node
    Thanks
    Sabrina

  • Hierarchical Tree and keyboard navigation

    Does anyone know how to use Hierarchical Trees with keyboards, or to disable keyboard actions? (forms 9.0.4)
    My form has a tree which does processing in a When-Tree-Node-Selected trigger to populate some blocks depending on the selected node. If the user selects nodes with the mouse then all is fine, but if they move between nodes with the keyboard then the processing for each selected node is only run the next time a node is selected with the mouse. This means the data for each node will flash up in the blocks for a split second when the mouse is next used.
    I've tried Key-Up/Key-Down triggers to prevent keyboard navigation, but they don't fire. Setting Keyboard Navigable to false doesn't fix it either.
    Using the When-Tree-Node-Activated trigger doesn't help. The online help says this trigger fires when the user presses Enter or double-clicks a node. I find that each node for which Enter was pressed is processed only when the user next double-clicks a node, and the node they double-click is not processed.
    Tree Query:select 1, level, ename, null, null
    from scott.emp
    connect by prior empno = mgr
    start with mgr is NULLWhen-New-Form-Instance:ftree.populate_tree('B.T');When-Tree-Node-Selected (1st and 4th lines commented out when changed to WTNA trigger):if :system.trigger_node_selected = 'TRUE' then
      message(ftree.get_tree_node_property(
                'B.T',:system.trigger_node,ftree.node_label));
      pause;
    end if;

    Hi James,
    We have got the same problem, after searching Metalink I found that this is a known bug. See Metalink Bug no 4565623 (base bug 4509399).
    Sjoerd

  • 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

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

Maybe you are looking for

  • How to replace one BC template with another

    I am using an existing BC template and want to change to a new template (same domain) - any thoughts on how to achieve this? Thanks.

  • Can I connect n iPod Touch to powered speakers?

    I have an old pair of computer powered speakers. Can I connect an iPod Touch or Shuffle directly to the powered speakers? I would like to use the speakers in a garage with the iPod.

  • Joining/hosting problems with two particular people

    I have a skype issue with just this one particular person, where if I or the particular person try to host a group call, the other person can't join and experience no sound, then get kicked out of the call. Rejoining didn't work, uninstalling didn't

  • Date & Time Showing always in the toolbar.

    I just switched to Snow Leopard. Before I switched I was able to make BOTH the date & time to show always in the toolbar. I can't remember how I did it on the earlier O.S.'s Thank you for your help.

  • Sorting out path items

    Hello everyone! I have a collection of circles and rectangles in my document. Is there any way to sort out circles from rectagles using JavaScript? Say i want to make my circles red and the rectangles blue. Yes, yes i am a total beginner in coding Th