How to get each node in tree?

how to get each node in tree?
Message was edited by:
NikisinProblem

how to get each node in tree?
Since (as far as I know) treeNode is an interface, the real question to me is how are you implementing your treeNodes? Are you overriding the toString() method?

Similar Messages

  • How to control each node mx:tree

    Hello all,
    I use an mx:tree. The issue is that I wantto control each node for creating lazy load mode tree. I want to see node as an clickable node which has children. But I'll call and add the childrens to dprovider when I need it, on click itemOpen event.The mx:tree watches dataprovider so show us the node if has children or not.If a node hasn't children in dataprovider, it will seem like an item,not a bin with itemOpen event.
    Can you suggest me to fix this problem ?
    footnote: Each node Object has Type property if it's Bin or Video etc. I want eachone if object.Type==bin, show me a bin with itemOpen event.
      It's called Disclosure Triangle, yeah, that I want to control this guy
    Thanks in advance

    DefaultDataDescriptor class is defined for mx:tree as default descriptor. You may manipulate it by creating your customDataDescriptor class and you can override isBranch , hasChildren and getChildren functions.
    For more details read about DefaultDataDescriptor class from http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/treeClasses /DefaultDataDescriptor.html .

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get each thread in the threadpool

    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g :
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?

    Willings wrote:
    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;You don't
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g : You don't
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?You should notify your "monitor" when you add something to the pool, and the Runnable/Callable should notify the same "monitor" when it starts to execute, and during its processing. Finally you notify the monitor when the execution has completed.
    Kaj

  • How to get the node id of the content shown from campaign

    Hi
    Can any one please tell how to get the node id of the content shown by the campaign
    in jsp
    Thanks

    One option is to define a custom ad renderer, which is registered with the proper mime-type.
    The campaign would run your renderer if the campaign retrieved a node with a binary of the proper registered mime-type.
    This allows you to insert yourself into the call chain for the node rendering. You can access the nodeID at that point (and do the typical rendering-- providing a URL for the ShowPropertyServlet)
    -Steve

  • How to get the node value of payload

    Hi
    The null is returned when I use the following code to get the User_ID element in the payload, but there are values in the User_ID element of the payload
    Task task_test = wfSvcClient.getTaskQueryService().getTaskDetailsById(wfCtx, taskId);
    System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getNodeValue());
    How to get the node value of payload ? any suggestion?
    Thanks
    Jayson

    Hi Jayson,
    Try:
    System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getFirstChild().getNodeValue());
    So add the getFirstChild() call in between.
    If this works, maybe consider using JAXB to marshall the payload details to POJO's. This will make reading the payload details much easier.
    Regards, Ronald

  • How to get correct node in JTree with DISCONTIGUOUS_TREE_SELECTION mode?

    The following code creats a JTree with DISCONTIGUOUS_TREE_SELECTION mode. When select a single node, the node's name is printed correctly as expected. However, in Window environment, after select one node, if holding the ctrl key and select a different node, the program still prints out the name of the first selected node although both nodes are highlighted. Can some one tell me how to get the name of the second (i.e. the last) selected node printed?
    Thank you very much!
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.io.*;
    public class TestTree extends JFrame {
    JTree tree;
    public TestTree() {
    super();
    setBounds(0,0,500,500);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    tree = new JTree();
    getContentPane().add(tree);
    TreeSelectionModel model = new DefaultTreeSelectionModel();
    model.setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
    tree.setSelectionModel(model);
    tree.addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
    Object obj = tree.getLastSelectedPathComponent();
    System.out.println(obj.toString());
    public static void main(String [] args) {
    TestTree test = new TestTree();
    test.show();

    Hi!
    Try this, maybe it's what you want?
    /Smedman
    public void valueChanged(TreeSelectionEvent e)
        TreePath[] paths = tree.getSelectionPaths();
        for (int i = 0; i < paths.length; i++)
            System.out.println(paths.getLastPathComponent());

  • How to add child node in Tree table programmetically

    Jdev Version 11.1.1.4.0.
    I have created tree table programmetically in bean.
    I have to add child node to tree table component on button click event on page.
    Please let me know how to do this in bean.
    Regards,
    Kiran

    How are you creating the tree pro-grammatically?
    If you are adding a new node to underlying data structure and refresh the tree - the tree will get updated with the new data.
    Thanks,
    Navaneeth

  • How to get keys on multilevel tree?

    Hello,
    I've got a problem with a multilevel tree with 3 levels on 3 related tables: grandparent -> parent -> child.
    When the user selects a child node (a leaf of the tree), my selectionListener needs the 3 primary keys: 1. for the current grandparent row on the path of the node, 2. for the current parent row on the path of the node, 3. for the child node the user has just selected.
    However, getSelectedRowKeys() is returning just the grandparent key, not a set with the 3 keys leading to the leaf node.
    My tree is defined as
           <af:tree value="#{bindings.GrandParent.treeModel}" var="node"
                    selectionListener="#{backingBeanScope.untitled1.treeSelectionListener}"
                    selectedRowKeys="#{bindings.GrandParent.treeModel.selectedRow}"
                    rowSelection="single" id="treePTM"
                    binding="#{backingBeanScope.untitled1.treePTM}">and my listener is
      public void treeSelectionListener(SelectionEvent event) {
        ELUtils.invokeMethod("#{bindings.GrandParent.treeModel.makeCurrent}", SelectionEvent.class, event);
        RowKeySet rks = ((RichTree)event.getSource()).getSelectedRowKeys();
        Iterator i = rks.iterator();
        while(i.hasNext()) {
           Object rowKey = i.next();
      }the single rowKey object returned only has the grandparent key, not the triplet (grandparent key, parent key, child key).
    How to get all the primary keys leading to the currently selected node when the selected node is not at first level?

    Hi,
    no, that code is fine.
    I solved by removing this property from the tree definition:
    selectedRowKeys="#{bindings.GrandParent.treeModel.selectedRow}"
    then rowKey has 3 values instead of 1.
    I use to set selectedRowKeys that way because that mimics what JDev declares automatically for af:table and that also automatically selects the first element in the tree (I'll just try to manually select the first element form code to workaround this)
    I thought treeModel.selectedRow held a reference to all the primary keys but this turns out not to be true. Thanks anyway for looking into this.

  • How to get each character in a string

    as in 'C' we use arrays to get each character of a string stored in array.how can we get each character of a string stored in a variable.

    Hi,
    For that you need to do offset.
    for example one variable called VAR contains string 'HUMERAH'.
    if you want each character of that string then you need to decalre as many variable as the number of string.
    like
    data : var1(1),
             var2(1),
    var(3),
    var(4).
    var1 = var+(1).
    var2 = var+1(1).
    var3 = var+2(1).
    var4 = var+3(1).
    now var1,var2,var3,var4. contains the single characters.
    Regards,
    Guru
    mark helpful answers

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • How to get a Node with Empty Text in a JTree

    Hi,
    I want to get the node which does not have any text and I want to get it when the tree expands NOT when the user selects a node( thats pretty easy)
    Thankx in advance...

    What do you mean by "get"?Since I would like to remove such a node therefoe I would like ot kow if such a node is in my JTree
    Thankx

  • How to get each frame Info in SWF ?

    Hi,all.
    I met a problem with SWF decomplie.
    If you have edited the fla files, store lots of frames which contains some shape information like pixels color, position and ect
    When you want to get that information in SWF, or rather, each frame information(like colors, pixels position), how to get that by AS3?
    Are there some ideas get frame info by AS3?

    Hi,all.
    I met a problem with SWF decomplie.
    If you have edited the fla files, store lots of frames which contains some shape information like pixels color, position and ect
    When you want to get that information in SWF, or rather, each frame information(like colors, pixels position), how to get that by AS3?
    Are there some ideas get frame info by AS3?

  • How to get current node element for recursive node.

    Hello Xperts,
    I have a requirement where I need to find the current node element of the recursive node.
    I was trying following code for the same
    Data:
    selected_elem type ref to if_wd_context_element.
    selected_elem  = WDEVENT->GET_CONTEXT_ELEMENT( NAME = 'CONTEXT_ELEMENT' ).
    selected_elem  ->get_static_attributes(
        IMPORTING
          static_attributes = sel_attri ).
    But it does not work for me and I always get 1st node value.
    Please help me in this issue.
    -Ashutosh

    Hello ,
             If you implementing a simple tree ( not table tree )  and you want the selected element for
    OnLoadChildren event  .
    Then create an importing parameter CONTEXT_ELEMENT  of type IF_WD_CONTEXT_ELEMENT
    in the event handler of onLoadChildren .
    Webdynpro framework automatically filled up the context element with the current node in the tree .
    I tried it , It really worked for me .
    If you have a table tree then you need to create an importing parameter PATH  of type String in tha event handler .
    Webdynpro frame automatically fills the PATH .
    the use can use the following method to get the element from the PATH .
    wd_context->path_get_element( path ).
    I tried it , It also  worked for me .
    Regards
    Vivek
    PS : please provide the points if answer is helpful .

  • How to get each column position in JTable?

    I want some buttons appear at the top of each column. For example,
      Button1    Button2  Button3
    | column1 | column2 | column3 |
    |--------------------------------------------|
    ...But button1,2 and 3 should be at the top of the column1, 2 and 3. So the problem is that how can I get each column's position.

    gajesh wrote:
    To get column index using column heading name, use following:-
    table.getColumnModel().getColumnIndex(columnName)You should use your own TableCellRenderer for header column:
    MyButtonHeaderRenderer extends JButton implements TableCellRenderer {
    <class definition>
    then you can set user-defined renderer to header column:-
    getColumnModel().getColumn(colIndex).setHeaderRenderer(new MyButtonHeaderRenderer());
    But the button is outside of the JTable. It is on the top of the Table. So I don't think implementing HeaderRender works here.
    I need to know each column's position (x,y) and place the button on the top of the columns.

Maybe you are looking for

  • ORA-22288: file or LOB operation FILEOPEN failed (The data is invalid)

    Dear All, I am trying to insert a image file (gif) to one of my field. 1. Here is my table structure and trying to insert gif image file to PIC file. SQL> desc cis2.david_pic Name Null? Type ID VARCHAR2(5) PIC BLOB 2. I using sql command to create di

  • Product Categories - Language Defect

    Dear All, Imp Scenario:Standalone Users: Buyer When i am trying to create a shopping cart by describe requirement (Non Catalog Scenario) am unable to see product categories in chineese languae. But when i try to login with english language am able to

  • Ipod wont recognise on pc and comes up with can't mount ipod

    Yea my ipod keeps flashing with do not disconect and it is annoyin me then i disconect it after bout 5 minutes of waiting them my come displays can't mount ipod if anyone can help would love to hear thankss

  • Is there an HP Toolbox that works with Windows 7 64-bit?

    I run Windows 7 64-bit with HP LaserJet CP1525nw color printer (networked).  I can't get HP Toolbox to work.  I recently tried to reinstall.. but when I try to run it, error message tells me the driver is not installed, which, of course, is not true.

  • Cannot export nfs-share over ipv6 in OS X 10.8

    I've successfully exported my nfs share over ipv4 and can access this with a nfs-client from a linux machine. However, I'm not able to export the same share over ipv6. In my /etc/exports I have: /Volumes/Harddisk -network 10.0.0.0 -mask 255.255.255.0