Traversing a tree with breadthFirstEnumeration

Hi all,
I'm trying to traverse a DefaultMutableNode tree using breadthFirstEnumeration. However, while traversing I need to remove some branches and continue with the Enumeration.
Do you know any way to preserve the Enumeration after removing a branch???
For example:
for(Enumeration en = trial.breadthFirstEnumeration(); en.hasMoreElements() ;) {
               DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)en.nextElement();
               if((String)currentNode.getUserObject() == "2") {
                    ((DefaultMutableTreeNode)(currentNode)).removeAllChildren();
               System.out.println((String)currentNode.getUserObject());
This code traverses a tree with depth 3 and branching factor 3. In the meanwhile it removes node 2's children.
However the otuput is
0 1 2 3 4 5 6
instead of: 0 1 2 3 4 5 6 10 11 12
I'd be very grateful if someone can help me.
Regards,
Pesho

This is how it usually is done.
Start with an empty map, e.g. HashMap. The map has e.g. company name as key, and company as value.
Start traversing, and do a lookup towards the map when you find a company reference. Use the company within the map if there is one, and create a new company and place it in the map if it doesn't exist. Populate the companies within the map with information when you bump into them during traversal.
The map will contain fully populated companies when the traversal is completed, and all companies will reference the same instances since you always are checking the map.
Kaj

Similar Messages

  • How to traverse a tree with a search

    I have a tree that has many leaves or nodes.
    I would like to have a search button where I put in a leaf or node name and it will go to the first occurrence on the tree and a next button that will take me to the next occurrence on the tree.
    The table I have looks like this.
    table name = PASS_NODE
    ID number,
    PARENT_ID NUMBER,
    NODE_NAME VARCHAR2(20)
    the sql code for the tree is:
    select "ID" id,
    "PARENT_ID" pid,
    CASE
    WHEN id = :P1_ID
    THEN '<span class="t1000url">'
    || node_name
    || ' >>'
    || '</span>'
    ELSE node_name
    END name,
    'f?p=&APP_ID.:1:&SESSION.::NO::P1_ID:'||id LINK,
    null a1,
    null a2
    from "#OWNER#"."PASS_NODE"
    order by NODE_NAME
    In the search text field the user will put in the NODE_NAME . I would like the search to traverse the tree by NODE NAME .
    Any ideas?

    I figured this out. In the "Search" process logic it was able to assign the value of the ID to the P1_ID page item.

  • Using depth first traversal to add a new node to a tree with labels

    Hello,
    I'm currently trying to work my way through Java and need some advice on using and traversing trees. I've written a basic JTree program, which allows the user to add and delete nodes. Each new node is labelled in a sequential order and not dependent upon where they are added to the tree.
    Basically, what is the best way to add and delete these new nodes with labels that reflect their position in the tree in a depth-first traversal?
    ie: the new node's label will correctly reflect its position in the tree and the other labels will change to reflect this addition of a new node.
    I've searched Google and can't seem to find any appropriate examples for this case.
    My current code is as follows,
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public class BasicTreeAddDelete extends JFrame implements ActionListener
        private JTree tree;
        private DefaultTreeModel treeModel;
        private JButton addButton;
        private JButton deleteButton;
        private int newNodeSuffix = 1;
        public BasicTreeAddDelete() 
            setTitle("Basic Tree with Add and Delete Buttons");
            DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Root");
            treeModel = new DefaultTreeModel(rootNode);
            tree = new JTree(treeModel);
            JScrollPane scrollPane = new JScrollPane(tree);
            getContentPane().add(scrollPane, BorderLayout.CENTER);
            JPanel panel = new JPanel();
            addButton = new JButton("Add Node");
            addButton.addActionListener(this);
            panel.add(addButton);
            getContentPane().add(panel, BorderLayout.SOUTH);
            deleteButton = new JButton("Delete Node");
            deleteButton.addActionListener(this);
            panel.add(deleteButton);
            getContentPane().add(panel, BorderLayout.SOUTH);    
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setSize(400, 300);
            setVisible(true);
        public void actionPerformed(ActionEvent event) 
            DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
            if(event.getSource().equals(addButton))
                if (selectedNode != null)
                    // add the new node as a child of a selected node at the end
                    DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("New Node" + newNodeSuffix++);
                      treeModel.insertNodeInto(newNode, selectedNode, selectedNode.getChildCount());
                      //make the node visible by scrolling to it
                    TreeNode[] totalNodes = treeModel.getPathToRoot(newNode);
                    TreePath path = new TreePath(totalNodes);
                    tree.scrollPathToVisible(path);               
            else if(event.getSource().equals(deleteButton))
                //remove the selected node, except the parent node
                removeSelectedNode();           
        public void removeSelectedNode()
            DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
            if (selectedNode != null)
                //get the parent of the selected node
                MutableTreeNode parent = (MutableTreeNode)(selectedNode.getParent());
                // if the parent is not null
                if (parent != null)
                    //remove the node from the parent
                    treeModel.removeNodeFromParent(selectedNode);
        public static void main(String[] arg) 
            BasicTreeAddDelete basicTree = new BasicTreeAddDelete();
    }      Thank you for any help.

    > Has anybody got any advice, help or know of any
    examples for this sort of problem.
    Thank you.
    Check this site: http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JTree.html

  • Advanced:   How to traverse a tree representation in PL/SQL (procedure)?

    I am looking to write a method that will create a collection of records, each of which represents a node in a tree.
    TYPE t_all_folders IS TABLE OF get_all_folders%ROWTYPE INDEX BY PLS_INTEGER;
    v_all_folders t_all_folders;
    so first need help in figuring out what the cursor 'get_all_folders' would look like
    I have a folder structure represented in a database that is used basically to show visually
    (with a front end app) a folder structure (much like a folder structure in a file system).
    So each row has an entry in the 'folders' table like do:
    table folder:
         column           column
         folder_id          name
         1                    folder1               <= say this is a root folder
         2                    folder2               <= say this is a root folder
         3                    folder3               <= say this is a root folder
         4                    folder1a          <= all below are child folders..
         5                    folder1b
         6                    folder1c
         7                    folder1aa
         8                    folder1ab
         There is nothing in this table that indicates a hiearchy.
    The hiearchy is represented by another single table with two columns
    (I cannot change this, it is what it is)
    There is no left node or right node (not like a tree), just imagine sub folders.
    table: parent_child
         column          column
         parent_id     child_id
    such that visually when the tables are queried and the UI uses a folder icon to
    represent each row:
    it would look like this:
         folder1                              1
              - folder1a                         2
                   -folder1aa                    3
                   - folder1ab                    4
              - folder1b                         5
                   - folder1ba                    6
                   - folder1bb                    7
              - folder1c                         8
         folder2                              9
         folder3                              10
    I am attempting to create a query that will add to a collection folder records in the
    order above (1..10)
    In other words traverse the tree depth first going from:
              folder1 -> folder1a -> folder1aa -> folder1ab ->(back out to next level) folder1b -> folder1ba -> folder1bb -> folder1c
              then add folder2 (and traverse down that hiearch if needed)
              and then add folder3 to the colleciton and traverse down that hiearchy if there is one
              and continue adn so on.
              The requirement is to have them added to the collection in that order and when I iterate through the collection,
              they would of course need to be pulled out in that order (so use vararray with a counter to iterate through
              after the collection has been created.
    After the collection has been created, I have to iterate in that specific order to create records in another table where there is a column that requires an integer value that is the 1... order they come out of the collection
    and then have to iterate again and do something else in that order (and then other things - all the while needing in that order).
    Edited by: user12200443 on Nov 19, 2012 11:49 AM

    awesome, thanks for the help.
    put this in 'schema.sql' and run to create a reference schema and data for the example
    drop sequence seq_folders;
    CREATE SEQUENCE seq_folders
    INCREMENT BY 1
    MINVALUE 1
    START WITH 1
    CACHE 1000;
    drop table folders;
    create table folders (
         folder_id number not null,
         name varchar2(20) not null
    drop table parent_child;
    create table parent_child (
         parent_id number not null,
         child_id number not null);
    -- creation order (in order to have parent)
    -- folder1
    -- folder2
    -- folder3
    -- folder1a
    -- folder1b
    -- folder1c
    -- folder1aa
    -- folder1ab
    -- folder1ac
    -- folder1aaa
    -- folder1aba
    -- folder1aab
    -- folder1abb
    -- folder1aac
    -- folder1abc
    -- Visual hiearchy
    -- folder1                              1
    --      folder1a                         2
    --           folder1aa               3
    --                folder1aaa          4
    --                folder1aab          5
    --                folder1aac          6
    --           folder1ab               7
    --                folder1aba          8
    --                folder1abb          9
    --           folder1ac               10
    --      folder1b                         11
    --      folder1c                         12
    -- folder2                              13
    -- folder3                              14
    --- insert folders
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder2');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder3');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1a');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1b');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1c');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1aa');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1ab');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1ac');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1aaa');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1aba');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1aab');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1abb');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1aac');
    insert into folders(folder_id, name) values(seq_folders.nextval, 'folder1abc');
    commit;
    -- setup hiearchy
    insert into parent_child(parent_id, child_id) values (0, (select folder_id from folders where name = 'folder1'));
    insert into parent_child(parent_id, child_id) values (0, (select folder_id from folders where name = 'folder2'));
    insert into parent_child(parent_id, child_id) values (0, (select folder_id from folders where name = 'folder3'));
    -- 1a,1b,1c
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1'), (select folder_id from folders where name = 'folder1a'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1'), (select folder_id from folders where name = 'folder1b'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1'), (select folder_id from folders where name = 'folder1c'));
    -- aa,ab,ac
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1a'), (select folder_id from folders where name = 'folder1aa'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1a'), (select folder_id from folders where name = 'folder1ab'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1a'), (select folder_id from folders where name = 'folder1ac'));
    -- aaa,aba,aab
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1aa'), (select folder_id from folders where name = 'folder1aaa'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1aa'), (select folder_id from folders where name = 'folder1aab'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1aa'), (select folder_id from folders where name = 'folder1aac'));
    -- aba,abb,abc
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1ab'), (select folder_id from folders where name = 'folder1aba'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1ab'), (select folder_id from folders where name = 'folder1abb'));
    insert into parent_child(parent_id, child_id) values ((select folder_id from folders where name ='folder1ab'), (select folder_id from folders where name = 'folder1abc'));
    commit;
    then run this to get the error message
    WITH joined_data     AS
         SELECT     f.folder_id,     f.name,     pc.parent_id
         FROM     folders     f
         JOIN     parent_child     pc ON pc.child_id = f.folder_id
    SELECT     j.*,     ROWNUM     
    AS r_num
    FROM joined_data     j
    START WITH     parent_id =0
    CONNECT BY     parent_id= PRIOR child_id
    ORDER SIBLINGS BY     name;
    thanks for the help, hopefully I can find a way to read the rows/record into a data structure (does not have to be a single sql statement - can be anything I can do in PL/SQL.
    Edited by: user12200443 on Nov 19, 2012 5:55 PM

  • Succinct encoding for binary tree with n nodes...

    How do I find all possible bit strings (Succinct encoding) for a binary tree with order n? Can anybody give me an algorithm?

    I associate the order of a tree with some sort of a search or traversal. What do you mean by a "+tree with order n+"?
    Could you perhaps give an example of what you're looking for?

  • Help using ListIterator to traverse a tree

    Need help traversing a tree.
    I have built the tree and now I am trying to traverse it to print it out. The main tree is a LinkedList, and each object on the list has a LinkedList of "children" which may or may not be empty.
    My thought was to have a local ListIterator in each LinkedList and use hasNext() and next() to return the objects. So I build the tree, then I try to reset the local iterator for everyone in the tree. But it's not working. If I initialize the ListIterator in the LinkedList class, I get a "ConcurrentModificationException" when I try to access the list. Or if I don't initialize the ListIterator but try to set it later, I get a "NullPointerException" at the same point.
    My questions are these:
    Should I be able to keep a local ListIterator in the LinkedList?
    And if so, am I doing it right?
    Should I be able to "reset" the ListIterator after having created it?
    And if so, am I doing that right?
    Is there a different way I should be traversing my tree?
    And, my burning question about this whole ListIterator thing: It appears from the online docs that a ListIterator is an Interface and not an Object. How can the listIterator method return an Interface?
    Here's my code:
    // the tree class
    public class PartTree
         private Part          rootPart;
         private File          dataModel;          
         private PartList     theTree;          
         private Part          currentPart;
         public PartTree(String dmPath, String rootPartType)
                   throws FileNotFoundException, IOException
              rootPart     = new Part();
              dataModel     = new File(dmPath);
              lostKids     = new PartList();
              theTree          = new PartList();
              rootPart.setName(rootPartType);
              rootPart.setChildList(theTree);
              refresh();
         public void refresh()
                   throws FileNotFoundException, IOException
              theTree = new PartList();
              String            line;          
              Part           ptr;          
              try
                   BufferedReader in =
                         new BufferedReader(new FileReader(dataModel));
                   line     = new String(in.readLine());
                   line = in.readLine();
                   while(null != line)
                         ptr = new Part(line);
                         insertPart(ptr);
                         line = in.readLine();
              catch(FileNotFoundException e)
                   throw new FileNotFoundException(e.getMessage());
              theTree.resetTreeIter();
              currentPart = rootPart;
    // the linked list class
    public class PartList extends LinkedList
         private Iterator listIter;               
         //private Iterator listIter = listIterator(0);     
         public synchronized void resetTreeIter()
              listIter = listIterator(0);
              Part ptr;
              Iterator it = listIterator(0);
              while( it.hasNext() )
                   ptr = (Part)it.next();
                   if( ptr.hasKids() )
                        ptr.getChildList().resetTreeIter();
         public synchronized Part nextPart()
              if( listIter.hasNext() )
                   return (Part)listIter.next();
              return null;
    }I know I am getting to the resetTreeIter method because when I replaced all the code there with a new exception, that got displayed.
    Thanks for any help,
    Connie

    Much though I hate the Visitor pattern, this does look like a good use of it. If you define an interface public interface PartVisitor
        public void visit(Part part);
    } and add a method to Part public void acceptPreOrder(PartVisitor visitor)
        visitor.visit(this);
        if (hasKids())
            Iterator it = getChildList().iterator();
            while (it.hasNext())
                it.next().acceptPreOrder(visitor);
    }Then to print them, you merely say topLevelPart.accept(
        new PartVisitor()
            public void visit(Part part)
                System.out.println(part);
        });/

  • How do I traverse a tree component ?

    How do I traverse a tree component ?
    I tried the following but it only returns 1 row. The dataprovider is XML.
    var datalength:Number = mytree.dataProvider.length;
    Alert.show(String(datalength));
    for ( var i:Number = 0; i < datalength; i++)
          Alert.show(mytree.dataProvider.getItemAt(i).@label); 

    I went with the following approach
    for each  
    (var attribute:XML in treeSource..@*)
         Alert.show((attribute.parent( ).@label
         +
    ": " + attribute.name( ) + "=" + attribute));}

  • How to build a BIG TREE with Tree-Form layout

    Hi,
    I do have a self-referenced table with our org structure - 15 000 positions.
    I do want to create a tree with this structure.
    Requirements :
    a, to have a tree-form layout
    b, to have search capabilities
    I have tried to use several combinations (maybe all)
    - from using only one View object and create recursive tree - doesn't even run
    - to use two View objects, first as top level nodes, the other as the rest - it runs
    but I can search only top level, and what is worse, by clicking on the node for showing additional information (tree-form layout) I'm waiting for ages for seeing the info
    (it seems that all records are loaded one by one into AS)
    Could you provide some ideas how to deal with this ?
    Thanks.

    I am sorry, this is beyond the scope of this forum.
    As with any functionality not directly provided by JHeadstart, you can build it yourself using the ADF design time tools in JDeveloper. Please use the JDeveloper forum for help on this first step.
    Then, to keep your pages generatable you can move these customizations to custom templates. We are happy to help you with this last step, should you have problems there.
    Steven Davelaar,
    JHeadstart Team.

  • Problem in using AdvanceDataGrid as tree with drag n drop functionality

    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.

    Please don’t use this forum for support questions, go use flexcoders or the Adobe forums instead.
    Matt
    On 2/10/09 11:21 PM, "rakess" <
    [email protected]> wrote:
    A new discussion was started by rakess in
    Developers --
      Problem in using AdvanceDataGrid as tree with drag n drop functionality
    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.  
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.
    View/reply at Problem in using AdvanceDataGrid as tree with drag n drop functionality <
    http://www.adobeforums.com/webx?13@@.59b7e11c>
    Replies by email are OK.
    Use the unsubscribe <
    http://www.adobeforums.com/webx?280@@.59b7e11c!folder=.3c060fa3>  form to cancel your email subscription.

  • Problem in Tree with in a table

    Hi Experts,
    I have created a WDC which contains the tree with in a table.
    I have created a table in the view and a Master column in it.
    Initially i loaded the tree with some values in my WDDOINIT of my view.
    I have also created the event handler for that Master column i.e., OnLoadChildren event handler.
    I have written some code in it, so that this event handler method will be called when i try to expand a node in the table.
    Unfortunately, the debugger is not getting in to that method, and that event is not being called when i Expand the tree node in the table.
    Please suggest me so that i can complete the assignment.
    Thanks in advance and for all the help given till now.

    Hi
    You can join a hierarchical query as you suggest; you can also use SYS_CONNECT_BY_PATH() to identify the subproduct. Here's the kind of query you need - I've used the HR sample data, but you should be able to transform this into products, subproducts etc
    select subproduct.first_name, subproduct.last_name, part.job_id, sum(part.salary), count(distinct part.employee_id)
    from employees subproduct
    left join (
    select level lev
         , sys_connect_by_path(last_name,'/') reportsto
         , sys_connect_by_path(to_char(employee_id,'fm0000'),'/') ancestors
         , substr(sys_connect_by_path(to_char(employee_id,'fm0000'),'/'),7,4) subprodid
         , emp.*
    from employees emp
    start with employee_id = 100 -- like identifying the product
    connect by prior employee_id = manager_id
    ) part
    on part.subprodid = to_char(subproduct.employee_id,'fm0000')
    where subproduct.manager_id=100
    group by subproduct.first_name, subproduct.last_name, part.job_idYou'll see I've used a fixed format connect_by_path (with 4 digits per level) which makes it easy to pull out the second level.
    HTH
    Regards Nigel

  • 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

  • Is it possible to create a tree with drag-and-drop functionality using ajax

    I saw these samples;
    Scott Spendolini's AJAX Select List Demo
    http://htmldb.oracle.com/pls/otn/f?p=33867:1:10730556242433798443
    Building an Ajax Memory Tree by Scott Spendolini
    http://www.oracle.com/technology/pub/articles/spendolini-tree.html
    Carl Backstrom ApEx-AJAX & DHTML examples;
    http://htmldb.oracle.com/pls/otn/f?p=11933:5:8901671725714285254
    Do you think is it possible to create a tree with drag-and-drop functionality using ajax and apex like this sample; http://www.scbr.com/docs/products/dhtmlxTree/
    Thank you,
    Kind regards.
    Tonguç

    Hello,
    Sure you can build it, I just don't think anyone has, you could also use their solution as well in an APEX page it's just a matter of integration.
    Carl

  • Tree with Icons

    hi, i need to hava a tree with icons in apex
    is it possible?

    hi, First of all You have to create table .
    CREATE TABLE "APEX_PAGES"
    (     "IDENTIFIER" NUMBER(10,0) NOT NULL ENABLE,
         "PAGE_NO" NUMBER(10,0) NOT NULL ENABLE,
         "PARENT_PAGE_NO" NUMBER(10,0),
         "NAME" VARCHAR2(4000) NOT NULL ENABLE,
         "NAVIGATION" VARCHAR2(100) NOT NULL ENABLE,
         "IMG" BLOB
         CONSTRAINT "APEX_PAGES_PK" PRIMARY KEY ("IDENTIFIER") ENABLE
    then create form with report on table apex_pages.
    Please note : - P20_IMG is an form item name...
    use following sql query for tree with image :
    select PAGE_NO id,
    PARENT_PAGE_NO pid,
    '<img src="'||*APEX_UTIL.GET_BLOB_FILE_SRC*('*P20_IMG*',IDENTIFIER)||'" />'||NAME name,
    'f?p=&APP_ID.:'||page_no||':&SESSION.' link,
    null a1,
    null a2
    from APEX_PAGES
    Also u can highlight the current node ................
    select PAGE_NO id,
    PARENT_PAGE_NO pid,
    CASE WHEN page_no = :APP_PAGE_ID THEN
    '<img src="'||APEX_UTIL.GET_BLOB_FILE_SRC('P20_IMG',IDENTIFIER)||'" />'
    ||'<b>'||NAME||'<blink>'||'<font color="red">'||' <='||'</font>'||'</blink>'
    ELSE
    '<img src="'||APEX_UTIL.GET_BLOB_FILE_SRC('P20_IMG',IDENTIFIER)||'" />' || NAME END
    AS name,
    'f?p=&APP_ID.:'||page_no||':&SESSION.' link,
    null a1,
    null a2
    from APEX_PAGES
    Cheers !!!!!

  • Analytical Services failed to get user's parent group tree with Error

    Hi,
    We have a frequent errror during our weekly batch for an application.
    The context:
    - Essbase Administration Services we are using is version is 9.3.1.
    - 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
    - For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
    - App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
    The issue :
    - We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
    - But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
    "Analytical Services failed to get user's parent group tree with Error".
    (** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
    Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
    I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
    Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?

    Hi,
    According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
    Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
    If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
    Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
     synchronization.
    More reference:
    http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Current node tree with tooltip_text

    Hello,
    How can i display a tooltip_text for the current node from a tree ?
    I tried with
    :Ctrl.Node_Selected     := Ftree.Get_Tree_Node_Property('BL_TREE.MENU',
    :SYSTEM.TRIGGER_NODE,
    Ftree.NODE_VALUE);
    set_item_property('BL_TREE.MENU',
    tooltip_text,
    :Ctrl.Node_Selected);
    I didn't find something with the build_in set_Tree_Node_Property
    There is a possibility to display an icon for each node ? I build the tree with a record group. How can I do it ?
    Thanks
    Bye

    hi,
    you can set the tooltip-text of the whole treebean according to the currently selected "active" node.
    Try to use the code you already used in a WHEN-TREE-NODE-SELECTED-Trigger.
    It's not possible to have a tooltip-text for each node separately.
    Yes, you can assign an icon to each node. Whn you use a recordgroup to fill the tree, one of the columns of the recordgroup has to be the name of the icon
    If i remember correctly the columns are
    NODE_STATE
    NODE_DEPTH
    NODE_LABEL
    NODE_ICON
    NODE_VALUE

Maybe you are looking for