How to get to a particular node in a hierarchical tree?

I want to do this simple thing with a hierarchical tree of forms.

Given that the tree has many levels and branches I want to give a search box.

The user types the label and press a button. The form must then ask the tree node and expand ONLY the path where is the node (if found) and highlight. If a node with a label is NOT found, I give an error message to the user.

I put hands on a code segment to explode a tree and changed 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;
VARCHAR2 (30) of the State;

BEGIN
-Search the ID of the tree-
htree: = Find_Item ('menu.tree');

-Search the root-
node: = Ftree.Find_Tree_Node(htree, '');

-Expand all nodes-
While WHAT NOT of LOOP of Ftree.ID_NULL (node)

State: = Ftree.Get_Tree_Node_Property (htree, node, Ftree.NODE_STATE);
State of IF = 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, cm, node);

IF Ftree.Get_Tree_Node_Property (htree, node, Ftree.NODE_LABEL) =: ctrl.node_lable_to_search THEN
EXIT;
END IF;
END LOOP;


END;

Try this line

DECLARE
htree;
BEGIN
htree: = Find_Item ('menu.tree');
Ftree.Set_Tree_selection (htree, 1, Ftree.SELECT_ON);
END;

-Clément

Tags: Oracle Development

Similar Questions

  • How to make a node of a hierarchical tree in BOLD

    When we click on the node of a hierarchical tree, we want to make the "BOLD" node. We tried to use the item set property but it does not work.

    It is not really a built-ins that will allow you to change the font of the tree node label. You might be able to do this with Java, but you must write your own Java Bean to implement. It might be easier to simply add an asterisk (*) to the label programmatically by using the Set-Tree-Node - Property () built-in, but there are problems with the removal of the asterisk when you exit the selected node or select a new node. It can be solved, but you'll have to save all of the information you will need to reset the node - just namly the Node_ID.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

    Published by: Silvere on February 24, 2012 07:52

  • How to get the attributes of node when you query the TQL via java API

    Hello

    I'm trying to pick up a hierarchy of IC using a TQL. I created a TQL on uCMDB and am now questioning him through the uCMDB java API. The TQL is simple and queires a hierarchy containing a Node (Server) containing the disks, file systems, interfaces and IP addresses.

    My code snippet is:

        UcmdbService ucmdbService = CMDBConnection.createCMDBService();
        TopologyQueryService queryService = ucmdbService.getTopologyQueryService();
        Topology topology = queryService.executeNamedQuery("BasicTopologyView");
        Collection allCIs = topology.getAllCIs();

        for (TopologyCI node : allCIs) {
                 System.out.println("Node is " + node.getPropertyValue("display_label") + "(" +node.getId().getAsString() + ") ... " + node.getPropertyValue("display_label")
                         + " ... " + node.getPropertyValue("TenantOwner")+ " ... " + node.getPropertyValue("discovered_os_name"));
             }

    The output I get is

    The node is/usr (18de9fd759680f10b4f1d3567fb0f5e5)... / usr... null null
    The node is/tmp (18eaac5d8ec14e45874029f25011a13c)... / tmp... null null

    Whatever properties I question are coming as null. Is there a way I can say uCMDB what I expect from each node to the execution of the attributes.

    Thanks in advance.

    Peyrot

    This problem is now resolved. The correct way to proceed, queryProperties method is used when querying of the node.

    node.queryProperties(props);
    

    When the accessories is a string containing all of the appropriate properties you want to take to uCMDB.

  • How to get the position of a ring in a tree control?

    Okay, this is probably a stupid question, but how can we get the position of a ring within a tree control?  I have a tree with two columns, with rings in the second column.  I can set the position using SetTreeCellRingValueFromIndex(), but how do you get the position once the user has changed the control?  I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex(), but I have not found a way to get the Index or the value of the ring (I'm looking for is the index, but if I can get the value I can from there).  Thanks in advance!

    You can get the value of the cell in the tree of GetTreeCellAttribute (ATTR_LABEL_TEXT). Then, as you noted, you can use GetTreeCellRingIndexFromValue() to get the index.

    I hope this helps.

    -jared

  • How to get XML of a node name data?

    I'm new to Flash and XML, so I hope I'm not asking a stupid question. I understood how to retrieve data from and by the position of the node XML file, but now I would like to know how to pull a specific node name. Here is what I currently have:

    about (overview)
    {
    myLot = 1;
    _root.myInfo = _root.myXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [this.myLot] Sublst.ChildNodes(1).ChildNodes(0) [0] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue;
    }

    With the file XML as follows:
    < SectionOne >
    < Lot1 >
    < Batch > 1 < / batch >
    < price >$ 450 000 < / price >
    Assets of < status > < / status >
    < / Lot1 >
    < Lot4 >
    < Batch > 4 < / batch >
    < price >$ 389 000 < / price >
    Sold < status > < / status >
    < / Batch2 >
    < / SectionOne >

    What I would like is to shoot instead of childNodes [this.myLot] to get the node named Lot1. The problem I have is I have always not consecutive lots and I don't want to have to build a placeholder empty xml online. I hope that makes sense.

    Sorry for the delay. I posted this on the discussion group, but I guess that it does not spread here.

    What you would do, is to use a loop statement and compare the nodeNames.
    To see a name of nodes as Lot1, you use:
    childNodes [x] .nodeName

    ******************************************
    Load the lotNodes object
    lotNodes = _root.myXML.childNodes [0];
    LotNodes contains now all Lot0, Lot1, batch2 nodes...
    Browse all childNodes lotNodes and compare the
    nodeName until you find the one you want then go down
    He has to get the information you want.
    for (var counter01 = 0; counter01<>
    If (lotNodes.childNodes [counter01] .nodeName == "Batch1") {}
    myInfo = lotNodes.childNodes [counter01] Sublst.ChildNodes(1).ChildNodes(0) [0] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue;
    }
    }
    ******************************************
    I don't have time to test it but it should work, I'll check double after work.
    I hope that this help you move forward.
    If you have any other problems or can't make it work, I would like to know here or send me an email. Preference here, so that others can learn and help.

    Scotty
    [email protected]

  • How can I find levels of knot / depth of recursive tree table?

    Guys,

    With the help of Studio Edition Version 11.1.1.3.0.

    After 2-3 days of banging my head against the screen, I'm ready to ask for help. I confess: I'm a noob and can't find a way to get the node level / depth of a treeTable. I've not seen mentioned in the forums or in one of the examples of treeTable on different blogs. Google, the praise of God, I was missed as well.

    I tried in my Parent-> children-> tree table Recursive Child (the child of references view object):

    (1) EL expressions (my EL sucks) in a text output in the node. Hoping that something like #{node. HierTypeBinding.Parent.etc.}, would produce a kind of valuable info I could handle.
    (2) setting the value of a managed bean node, but do not know how to get the currently rendered node. I can only figure out how to get the node currently selected, which is only useful after the table has already been made.
    (3) level creating a transitional field called in the child view object and setting its equal to level sound + 1 ViewRowImpl, but if the child has many parents, I get incorrect calculations. I have the most away with this, but finally gave up. To access the feature through ViewLinks works great to browse children lines, but by train to get parent node is disconcerting if you have several parents.
    (4) the two saying "Please!" and various metaphors of four colorful letters. Not had much effect.

    Any kind of branch or help would be great.

    Thanks guys,.
    Will be

    Based on the Employees table in the HR schema, a link is defined between the employee-id and the id manager.
    When an instance of the view that above is used as table (recursive) tree, I am able to find the depth of the node.

    Example code:
    JSPX code fragment:


    selectionListener = "#{bindings." Employees.treeModel.makeCurrent}.
    rowSelection = "single" id = "tt1".
    styleClass = "AFStretchWidth" >



    *
    ID = "ot3" / >





    PageDef:











    Can you have the same card in your scenario and see if you can get the depth of a node?

    Thank you
    Nini

  • How to get the value of a particular column column name?

    Hi all

    How to get the column name for a particular column value.
    example:

    create table test (ID number, col2, col3 varchar varchar);

    Insert into test values (1, 'true', 'false');
    Insert into test values (2, 'false', 'true');
    commit;

    I want to choose the name of the data column 'true' with id = 1;

    That is to say) while waiting for answer is "col2". pls help someone.

    This might help:

    DECLARE
       c1 SYS_REFCURSOR;
    BEGIN
       OPEN c1 FOR
       SELECT col2,
              col3
       FROM   test
       WHERE  id = 1;
       --
       FOR c IN (SELECT rownum rn,
                        t2.column_value.getrootelement() name,
                        EXTRACTVALUE(t2.column_value, 'node()') value
                   FROM TABLE(XMLSEQUENCE(c1)) t,
                        TABLE(XMLSEQUENCE(EXTRACT(column_value, '/ROW/node()'))) t2)
       LOOP
          IF c.value = 'true' THEN
             DBMS_OUTPUT.PUT_LINE(c.name);
          END IF;
       END LOOP;
    END;
    
  • How to get the reference or the property of a member in OOP node?

    Hello world

    Is it possible to get the referral of a member in OOP?

    After you have created a class and an insert, a member of control in the cluster, I conclude that, when a right click on it, there is no element of "creat-> reference" or "create-> property node?

    So, how to get the reference or the property of a member in OOP node?

    Hello

    There are a few reasons that you can't do what you want to do:

    1 al ' LVOOP ordinary (as opposed to the DVRS in LabVIEW 2009, or some other framework / pattern design) are items of LabVIEW by value, as a cluster and therefore you can not create a reference to a class.

    2. a control of the object (this is what you get when you drop an object on a façade) is a 'black box' because you cannot look inside. This is to support the idea that the class data private. This means that you can't get a reference to all internal control when its on a façade

    3. check the references are valid only for the controls in the Panel before and therefore any class (or other piece of data of LabVIEW) on a wire / shift register / constant / anywhere other that of the façade, will have only the data portion of the available control.

    To access the items within a class, you create the accessor screws (you can create them easily by right-clicking a class (or the folder within the class) in the project tree and selecting New-> VI to access data members.) This VI would at least have a unbundle / bundle node (depending on whether its read/write) and could, if you have many more features such as range checking. You can use this VI whenever you want to read the Member your interested.

    I hope this helps.

    Shaun

  • How can I get for a particular Cloud Service resale rights?

    How can I get for a particular Cloud Service resale rights?

    Each Cloud Computing Service has the criteria to resell and required training listed on their respective areas of knowledge. In the KZ, click on the tab "Apply to resell" and you will find steps 1. The first step lists all the items that are included in this family of products. Step 2 lists the criteria. When you have completed all the elements of second stage, and then you select step 3 which will guide you through the actual enforcement process. As mentioned in one of the other questions here, you must also be a Gold member or superior, have an active FUDA (Distribution of full employment agreement) and a CSDA (Cloud Services Distribution Addendum). All products that appear to sell, with links to their respective KZ are at oracle.com/partners/goto/cloud.

  • How to get the particular record last

    Hello

    I want the query because if a particular record available when enter as a last record.

    Ex,

    name
    ----------
    s
    t
    h

    but t is always the last record. How to get?


    Thank you
    Alphadi.

    Welcome to the forum.

    Do you mean you want to 'h' to appear as the last record?
    Try:

    SQL> -- generating sample data:
    SQL> with t as (
      2  select 'h' name from dual union
      3  select 's' from dual union
      4  select 't' from dual
      5  )
      6  --
      7  -- actual query:
      8  --
      9  select name
     10  from   t
     11  order by case
     12             when name = 'h' then 2
     13             else 1
     14           end;
    
    NAME
    --------------------
    s
    t
    h
    
    3 rows selected.
    
  • How to get the name of the particular index table option.

    Hello

    Can any body tell how to get the name of the item to a particular array.i have a table within array.i must compare the name of Francesca in particular key.here is the table.

    myArray= Array (@43b1e09)
    [0] = object (@42b33f9)
    Testing_1 = Array (@4428821)
    [0] = object (@43adc19)
    choice_id = '0 '.
    delete = "N".
    DownloadURL = "xyz".
    selected = 'Y '.
    translation = "2_486."
    length = 1
    length = "N".
    Editable = 'Y '.
    field_id = '388 '.
    LanguageLink = 'Y '.
    linked_definition_id = null
    multiple values = "N".
    name = "Photo".
    otheroption = "N".
    photovitlink = object (@43ad0d9)
    required = "N".
    step = '1 '.
    translation = "Photo".
    visible = 'Y '.
    [1] = object (@43ad5d9)
    [2] = object (@4490089)

    Here is the structure of the table I get server side.i give table name of result as table myArray.This have several child as an object of object.each having .i table (Testing_1 in the first case) must get the name of this Testing_1 table and compare with my sort key that I perform an operation. But I am unable to get the name of this Testing_1 array(Since_it_is_dynamic_so_this_name_changes_some_times).can a body guide me how to get the name of this table.



    Thanks and greetings

    Vineet Sharma

    Hi Vineet Osho,

    You can browse your object using the loop and you can get the name of the table... as below...

    for each (var obj:Object in myArray)
    {
    for (var str:String in obj)
    {
    If (obj [str] is array)
    {
    var arrayName:String = str;
    }
    }
    }

    Thank you

    Jean Claude

  • XML: How to get the value of the node when the node of pasing as a parameter name

    Hello

    I've got some xml:

    var xmlData:XML = 
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    

    So, I want to read the value of specific node based on a value passed to a function. .

    var buttonID = new Button;
    
    var imageID = new Image;
    
    var labelID = new Label;
    
    
    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    
    trace (xmlData.nodeName)                      //doesn't work
    
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    
    }
    

    I don't know how to get the value when the name of the node is changed dynamically.

    use:

    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])
    }
    
    
  • How to get the length and sub lymph nodes.

    Hello

    find the script below.

    < List1 >

    < list >

    < List1 >

    < List1 >

    < List1 >

    < / list >

    < list >

    < List2 >

    < List2 >

    < List2 >

    < / list >

    --

    --

    -

    -

    -

    -< / list1 >

    Here the tag list will be growing based on the I / p. Now what I want is to know how to get the length of the tag < list >.

    To implement the above I used the code below

    var number = xfa.record.List1.List [0].nodes.length; (Does not work)

    But if var account = xfa.record.List1.nodes.length; (work)

    and also I want to delete a tag inside the < List > tag. How?

    Very Urgent.

    Thanks in advance.

    Yes, you need to use the name instead of the value to get the tag name...

    xfa.datsets.data.Root.nodes.item (0) .name

    Thank you

    Srini

  • E4X: How to get the items that contain a string pattern in the name of the node?

    Is there a way to retrieve the children of an XMLList where the name of the node of a child contains a template string?

    For example:

    account <>

    < XblahX / >

    < cow / >

    < YblahY / >

    < / recording >

    How to get items in folder which has a node name that contains the string "blah"?

    var rec: XML =

    ;

    var r: RegExp = / blah /;
    var elems:XMLList = rec.children (). (localName () *.search (r) >-1);
    trace (elems. ToXmlString())

  • How to get the value of a particular tag to a column (clob)

    Hi friends,

    How to get the value of a particular tag to a column (clob), which has an XML value?

    Thanks in advance.

    Kind regards
    Sirot Chauvet

    You are welcome, if you got your answer to the question as such brand

Maybe you are looking for

  • Reset the computer to start

    Hello When I bought my desk, it has a 19 GB drive or something where PC Reset file has been saved, but somehow, it has been deleted. SO I can't reset my PC now. I want to know how I can recreate this player and reset my computer. I want to do as I bo

  • L540 integrated webcam no longer works

    I have a refurb L540 I had a few months ago, and the webcam suddenly stopped working. Here's what it looks like when I try to use it anywhere. Any ideas?

  • problem to activate product key number

    1. can not activate this certificate number of product in my pc activation key.

  • Windows 10 Intall error

    I received my free download install Windows 10 and everytime I try installing I get the error C1900101-20004 and the installation fails. Because I first tried this installation I couldn't access the regular sites due to new browser settings that I ha

  • Is there a command to echo to RMAN?

    11.2.0.4/Oracle Linux 6.3Is there an equivalent of the echo in RMAN command? In the log file, I want the following in red print.RMAN target = / nocatalog < < EOFrun{restore the database;switch datafile;Echo «Starting recover...» »recover the database