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 .

Similar Messages

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

  • 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

  • Help!how remove child's node in tree.

    I think remove child's node of tree in run times.
    thanks

    Hi!
    Try to look this:
    http://blogs.sun.com/winston/entry/creating_dynamic_table
    Maybe it will be helpful for You.
    Thanks,
    Roman.

  • How to open child node in Tree control?

    Hi All,
    I am using arrayCollection in my tree control.
    I want to open one child node based on name of that node.
    How to open that chid node?
    I tried tree.OpenItems and ExpandItem methods. IT is not working. Any idea how to do it?

    write this statement
    TreeObject.expandItem("the branch",true)
    But make sure you dont call this statement right after you set the dataProvider for the tree object. Instead wait for a second or two and then call this statement. This delay is allow the tree object ot call it validate functions.
    Let me know if it helps

  • How to create multi node /data Tree by using few loops or small code

    HI.
    I WANT TO CREATE A TREE WHICH IS HAVING MULTI NUMBER OF NODE LEVEL (USER HAVE THE ABILITY TO CREATE AS MANY AS REQUIRED NODE LEVEL OR SUBLEVEL). HOW CAN I POPULATE THE TREE WITH SMALL CODE. AS EVERY NODE LEVEL NEED ON NESTED LOOP. SO HOW CAN I MANAGE TO POPULATE THE NODE WITH FEW LOOPS. OR THERE IS ANY OTHER WAY TO MANAGE THIS PROBLEM.
    THANKS

    Hi ,
    I am trying to do the job , but i do not understand where
    is the problem with my loop , i am sending it , could you
    see it , and sujjest me , what to do. or if you have time
    can you write the code for me. as i am very much needy for
    this job.
    The Table is as:-
    CREATE TABLE TREE_01(
    RECORD_NO NUMBER(10), --
    OWN_CODE VARCHAR2(10),
    PARENT_NO NUMBER(10),
    PARENT_CODE VARCHAR2(10),
    LEVELL NUMBER(4),
    DEPT NUMBER(6),
    CONSTRAINT RNO_PK PRIMARY KEY(RECORD_NO));
    INSERT INTO TREE_01 VALUES(1,'1',0,'0',2,8540);
    INSERT INTO TREE_01 VALUES(2,'2',0,'0',2,8540);
    INSERT INTO TREE_01 VALUES(3,'3',0,'0',2,8540);
    INSERT INTO TREE_01 VALUES(4,'4',0,'0',2,8540);
    INSERT INTO TREE_01 VALUES(5,'1',1,'0',3,8540);
    INSERT INTO TREE_01 VALUES(6,'2',1,'0',3,8540);
    INSERT INTO TREE_01 VALUES(7,'3',1,'0',3,8540);
    INSERT INTO TREE_01 VALUES(8,'1',3,'0',3,8540);
    INSERT INTO TREE_01 VALUES(9,'2',3,'0',3,8540);
    the loop shoud look like
    |_DataProcessing
    | |+Work_orders
    | |_Programmers File
    | | |_James
    | | | |+Requests
    | | | |+Leves
    | | | |_Projects
    | | | |_Projects001
    | | |+Steven
    |+HealthCare
    |+Transportation
    So the loop should be such that it can be go to any level of any node.
    the Code i writter is As follows.
    The Following Procedure is called in form leve
    When new forms instance.
    PROCEDURE REFRESH_TREE2 IS
    CURSOR CUR_DEPT IS
         SELECT DEPT
         FROM TREE_01 GROUP BY DEPT;
    CURSOR CUR_LOOP1(PARENT1 NUMBER,LEVEL1 NUMBER) IS
         SELECT RECORD_NO,
         OWN_CODE,
         PARENT_NO,
         DEPT ,
         PARENT_CODE,
         LEVELL
         FROM TREE_01
         WHERE LEVELL=LEVEL1
         AND RECORD_NO=PARENT1;
    CURSOR CUR_LOOP2(PARENT2 NUMBER,LEVEL2 NUMBER) IS
         SELECT RECORD_NO,
         OWN_CODE,
         PARENT_NO,
         DEPT ,
         PARENT_CODE,
         LEVELL
         FROM TREE_01
         WHERE LEVELL=LEVEL2
         AND RECORD_NO=PARENT2;
    CURSOR LEVEL(PARENTNO NUMBER) IS
         SELECT LEVELL FROM TREE_01 WHERE PARENT_NO=PARENTNO
         ORDER BY RECORD_NO;
         V_I NUMBER;
         V_IGNORE NUMBER;
         RG_DEPT RECORDGROUP;
         RG_CABI RECORDGROUP;
         V_INIT_STATE GROUPCOLUMN;
         V_LEVEL GROUPCOLUMN;
         V_LABEL GROUPCOLUMN;
         V_ICON GROUPCOLUMN;
         V_VALUE GROUPCOLUMN;
         V_CHANGE_VALUE VARCHAR2(20);
         V_CHANGE_VALUE1 NUMBER(3);
         V_CHANGE_VALUE2 NUMBER(3);
    V_LEVEL_COUNT NUMBER;
    BEGIN
         SELECT MAX(LEVELL) INTO V_LEVEL_COUNT FROM TREE_01;
         RG_DEPT:=FIND_GROUP('DEPT');
         if not id_null(RG_DEPT) then
    delete_group(RG_DEPT);
    end if;
         RG_DEPT:=create_group('DEPT');
         V_INIT_STATE := add_group_column(RG_DEPT, 'INIT_STATE', NUMBER_COLUMN);
         V_LEVEL :=ADD_GROUP_COLUMN(RG_DEPT,'LEVEL',NUMBER_COLUMN);
         V_LABEL :=ADD_GROUP_COLUMN(RG_DEPT,'LABEL',CHAR_COLUMN,40);
         V_ICON :=ADD_GROUP_COLUMN(RG_DEPT,'ICON',CHAR_COLUMN,20);
         V_VALUE :=ADD_GROUP_COLUMN(RG_DEPT,'VALUE',CHAR_COLUMN,15);
         V_I :=1;
         FOR DEPTREC IN CUR_DEPT LOOP
         ADD_GROUP_ROW(RG_DEPT,V_I);
         SET_GROUP_NUMBER_CELL(V_INIT_STATE,V_I,1);
         SET_GROUP_NUMBER_CELL(V_LEVEL ,V_I,1);
         SET_GROUP_CHAR_CELL(V_LABEL ,V_I,FILING.ELOOK_IT(11,0,DEPTREC.DEPT));--MAIN_MINOR));
         SET_GROUP_CHAR_CELL(V_ICON ,V_I,NULL);
         SET_GROUP_CHAR_CELL(V_VALUE ,V_I,TO_CHAR(DEPTREC.DEPT)); --MAIN_MINOR));
         V_I:= V_I +1;
         V_CHANGE_VALUE := DEPTREC.DEPT;
         FOR I IN 1..V_LEVEL_COUNT LOOP
         FOR DEPTREC1 IN CUR_LOOP1(V_CHANGE_VALUE,I) LOOP --MAIN_MINOR,I) LOOP
         ADD_GROUP_ROW(RG_DEPT,V_I);
         SET_GROUP_NUMBER_CELL(V_INIT_STATE,V_I,1);
         SET_GROUP_NUMBER_CELL(V_LEVEL ,V_I,I);
         SET_GROUP_CHAR_CELL(V_LABEL ,V_I,DEPTREC1.RECORD_NO);
         SET_GROUP_CHAR_CELL(V_ICON ,V_I,NULL);
         SET_GROUP_CHAR_CELL(V_VALUE ,V_I,DEPTREC1.RECORD_NO);
         V_I:= V_I +1;
         SELECT count(LEVELL) INTO V_CHANGE_VALUE1
    FROM TREE_01
    WHERE RECORD_NO=DEPTREC1.RECORD_NO
         AND PARENT_NO=DEPTREC1.PARENT_NO
         AND LEVELL=DEPTREC1.LEVELL;
         SELECT MAX(LEVELL) INTO V_CHANGE_VALUE2
         FROM TREE_01
         WHERE RECORD_NO=DEPTREC1.RECORD_NO
         AND PARENT_NO=DEPTREC1.PARENT_NO
         AND LEVELL=DEPTREC1.LEVELL;
              FOR j IN 1..V_CHANGE_VALUE1 loop
              FOR LVL IN LEVEL(DEPTREC1.RECORD_NO) LOOP
              FOR DEPTREC2 IN CUR_LOOP2(DEPTREC1.RECORD_NO, LVL.LEVELL) LOOP
         ADD_GROUP_ROW(RG_DEPT,V_I);
         SET_GROUP_NUMBER_CELL(V_INIT_STATE,V_I,1);
         SET_GROUP_NUMBER_CELL(V_LEVEL ,V_I,LVL.LEVELL);
         SET_GROUP_CHAR_CELL(V_LABEL ,V_I,DEPTREC2.RECORD_NO);
         SET_GROUP_CHAR_CELL(V_ICON ,V_I,NULL);
         SET_GROUP_CHAR_CELL(V_VALUE ,V_I,DEPTREC2.RECORD_NO);
         V_I:= V_I +1;
         V_CHANGE_VALUE := DEPTREC2.RECORD_NO;
                   end loop;
         end loop;
         END LOOP;
         END LOOP;
         END LOOP;
         END LOOP;
         ftree.set_tree_property('NAVIGATOR.NAV_DISPLAY',ftree.record_Group, rg_dept);
         end;

  • How to select more than one node in tree

    Hi
    plz any one know how to select multi nodes in tree components ??
    i wana select two employees or more from tree in order to know their informations how can i do that
    10nx for help

    i can select them from different parents that depends on what i want to select Like:
    Admin-Sam
    -Dinda
    Users-David
    -Marylinn
    -Sandra
    for ex: i wana choose Sam , Sandra & David to view thier times and OT on selecting them

  • BSP Tree View - how to create checkboxes on each node?

    Hello all,
    On my (non-MVC) BSP page I'd like to have a tree in which each node has a checkbox that the use can select, e.g. node 1.1: X, node 1.2: space; node 1.3: X
    It doesn't seem like the standard <htmlb:tree> can do this. Is there any quick way I can achieve this functionality?
    Any suggestions/code samples will be appreciated.
    Rgds,
    Louis.

    Hi Louis,
    Go through the sample program which is exactly as per your requirement,
    http://www.sapdevelopment.co.uk/webapps/bsp/bsp_orgunit.htm
    Regards,
    Azaz Ali.

  • How to edit the node value of a tree in webdynpro java

    Hi ALL
    I have Tree UI element where i got displayed all the nodes by calling the BAPI
    Now my requirement is when i put the cursor at any node in the Tree struture then on click of insert button i need to insert the new node with the text  , the user has to be option to give new text for the new node dynamically  , so while adding the new node in a tree the tree has to choose the text for new node , like how to edit the node of a tree to add new text.
    If any one can send the sample code on the same then it would be great help to me.
    Similar requirement like in table UI Like however we are adding the new row in a table when we click on the insert button then cursor will go to that new row in a table where user can enter his details in the table.. now i am looking for the same requirement in a Tree UI element.
    is it possible the same requirement in tree UI element in webdynpro for Java??
    Thanks
    kallki reddy

    Hi kallki reddy
    In general I think this is not possible in the form you'd like. It seems the Tree control is read-only thing always. It cannot provide editing capabilities.
    Table is different thing. You can select within many different cell editors including Input Fields.
    I guess that you scenario could be implemented not with Tree control, but with Table with Master Column. The master column allows to bring up a hierarchy into a plain table. So it's just a tree inside a table.
    Here you can find further details: [TreeByNestingTableColumn API|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/92/12a74046033913e10000000a155106/content.htm]
    BR, Siarhei

  • How can i loop over treeview selected nodes and then to delete each node if it's a directory or a file ?

    I have this code:
    if (s == "file")
    file = false;
    for (int i = 0; i < treeViewMS1.SelectedNodes.Count; i++)
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    I know it's a file and it is working if it's a single file.
    On the treeView i click on a file right click in the menu i select delete and it's doing the line:
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    And it's working no problems.
    But i want to do that if i selected some files togeather multiple selection then to delete each file.
    So i added the FOR loop but then how do i delete from the SelectedNodes each node ?
    The treeView SelectedNodes dosen't have FullPath like SelectedNode also doing SelectedNodes[i] dosen't have the FullPath property.
    Same as for if i want to delete a single directory or multiple selected directories:
    This is the continue of the code if it"s not a "file" (else) it's null i know it's a directory and doing:
    else
    file = true;
    RemoveDirectoriesRecursive(treeViewMS1.SelectedNode, treeViewMS1.SelectedNode.FullPath);
    Also here i'm using SelectedNode but if i marked multiple directories then i how do i loop over the SelectedNodes and send each SelectedNode to the RemoveDirectoriesRecrusive method ?
    My problem is how to loop over SelectedNode(multiple selection of files/directories) and send each selected file/directory to it's method like i'm doing now ?

    foreach (TreeNode n in treeViewMS1.SelectedNodes)
    // Remove everything associated with TreeNode n here
    I don't think it's any harder than that, is it?
    If you can multi-select both an item and one of its descendents in the tree, then you'll have the situation that you may have deleted the parent folder and all of its children by the time you get around to deleting the descendent.  But that's not such
    a big deal.  A file can get deleted externally to your program too - so you'll just have to deal with it having been deleted already (or externally) when you get around to deleting it yourself.

  • How to access SPECIFIC camera attributes tree (camera controls) located in MAX with Labview?

    How to access specific camera attributes tree (camera controls) located in MAX with Labview?
    I want to be able to access frame, trigger and grab properties. Does anyone know?
    Thanks.
    /Peter

    Please see this related thread http://forums.ni.com/t5/LabVIEW/IMAQdr-Property-Node/m-p/1642950/highlight/false#M590168
    Matt
    Product Owner - NI Community
    National Instruments

  • Tree control with Nodes in ALV

    Hi ABAP Gurus,
    I am trying to create tree control with nodes in ALV. I have referred to standard BCALV_TREE* programs but new to OO programming. Not sure as to how I can display my internal table data than the SFLIGHT information in these programs. Can you please let me know how this can be done or if I can use any ALV function modules for the node display.
    thanks,
    Chaitanya

    Maybe you could use this.  Call this VI from a Value Change event of the tree.
    Attachments:
    Check_Tree_Items.vi ‏28 KB

  • Add a button after each node of my tree

    Hi !
    I would like to add a button after each node of my tree. I think I have to create a new TreeCelleRenderer but I really don't know how to make it. Can someone help me and give me an idea (or an example !) about the code.
    When I click the button, I must know from which node the event comes.
    thanks.
    delph

    Hi, how did you resolve the problem. Well it's long time from your posting, but maybe someone else can help me...
    I'm creating similar JTree where's print and save buttons in some of the nodes. I created custom cell renderer which extends JPanel and holds images, text and the buttons inside it. Is it possible to link buttons' actionlisteners somehow to the nodes. I tried it customizing cell editor, but I can't get button events fired. I also tried to catch "button clicked" action using mouse listener in my tree and that worked somehow and can be used as quick and dirty solution. Still I want to do it better way.
    -e

  • How could i put the text background of each node transparent?

    I am working on JTree. I Assign distinct icons to each node and a background image to the Jtree. I use transparent images to each node but the background text of each node have color. How could i do to put the text background of each node transparent.

    Your tree cell renderer should include the line "setOpaque(false);".

  • How can I get the adf-tree-node's attributes?

    I want get the attributes in the method of "selectionListener"?
    How can I do?
    I only know :
    RichTree treeId;
    RowKeySet keySet = treeId.getSelectedRowKeys();
    Thanks!

    You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
    Also, JTree has getter/setter methods for the selectionPath.

Maybe you are looking for

  • Problem in displaying arabic

    Hi I am having a problem in displaying arabic language. The problem is that sentences are not being displayed in correct format. That is they are displaying in the format like left to right languages and not in the format like right to left languages

  • Report on Service Entry Sheet

    Hii.. do we have any report which will give us data like qty entered in 1st Entry sheet, 2nd , 3rd ...... cumulative and remaining. Regards,

  • CRM on demand/Pim sync want to sync appointment

    Hello Experts When i use Pim Sync to synchronize my appointments with CRM on demand Pim sync wants to add appointments that arent deposited in my CRM System. For example certain public holidays. Has this acurred to anybody except me? Is there a way t

  • Accidently interrupted update

    I'm not sure this is the right forum section for my issue but I suspect it will involve an installation. That's what I want to ask. Is reinstalling my OS the only option? I am unable to do anything other than boot from my installation CD. I did a rep

  • WS-Security compatibility using Oracle Business Process Manager

    Hi All, Actually I like to invoke couple of secure services running on seperate server.These services are secured using WS-security.So I am just wondering how to configure Oracle Business process Manager so that process bpel file uses the certificate