Control tree and dataprovider XML

Hello

I am trying to get this xml file ( http://mitjafelicijan.net/test.xml ) working with my tree control in my Flex application and may not know how exactly to do this.

What is my Flex code

< mx:Tree left = "0" top = "0" low = '0' showRoot = "true" id = "trvTreeview" right = "0" > < / mx:Tree >

and my AS code is this

var tmp:XML = XML (event.target.data);
trvTreeview.dataProvider = tmp.node;

I get this result

http://mitjafelicijan.NET/tree.PNG

The default data descriptor will see any child node as a child and claim that this node is a folder.  If the xml node uses attributes like this:

Then there is no of child nodes.  However, if you cannot change the structure of the XML, you can create a custom TreeDataDescriptor that is smarter about hasChildren()

Alex Harui

Flex SDK Developer

Adobe Systems Inc..

Blog: http://blogs.adobe.com/aharui

Tags: Flex

Similar Questions

  • Problems using collection ArrayCollection as a DataProvider for trees and the menu bar, possibly bug?

    Hi guys,.

    I'm having some troble using a collection ArrayCollection as a DataProvider for a tree and a menu bar...

    I read some Adobe documents on this subject, and I read that two components read the dataProvider in the same way.

    but my current works of DataProvider well on the tree, but not on the MenuBar component...

    My dataProvider is an ArrayCollection collection of a custom class (which extends from ArrayCollection collection), and among its assets is a children's collection: ArrayCollection, so the hierarchy can be read correctly.

    When I use the component of the tree it works, but the menu bar do not display the branches...

    Can someone help me?

    Here's the function that create my dataprovider:


    private function fnFillDP (): void {}
    for (var i: int = 0; admResult.length > i; i ++) {}
    If (.nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) == 0) {}
    var novoMenu:CL_ArrayMenu = new CL_ArrayMenu();
    novoMenu.idMenu = .idMenu JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.titulo = .titulo JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.parent = .parent JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.nivel = .nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.ordem = .ordem JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);

    dataProvider.addItem (novoMenu);
    } ElseIf (.nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) == 1) {}
    for (var j: int = 0; dataProvider.length > j; j ++) {}
    {If (CL_ArrayMenu(dataProvider[j]).idMenu == {JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) .parent})}
    var novoMenuChildren:CL_ArrayMenu = new CL_ArrayMenu();
    novoMenuChildren.idMenu = .idMenu JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.titulo = .titulo JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.parent = .parent JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.nivel = .nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.ordem = .ordem JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    If (dp.length > 0) {}
    If (CL_ArrayMenu (dp.getItemAt (0)) .parent == novoMenuChildren.parent) {}
    dp.addItem (novoMenuChildren);
    } else {}
    DP = new ArrayCollection();
    dp.addItem (novoMenuChildren);
    }
    } else {}
    dp.addItem (novoMenuChildren);
    }

    CL_ArrayMenu (DataProvider [j]). Children = dp;
    break;
    }
    }
    }
    }
    tree.dataProvider = dataProvider;
    menu.dataProvider = dataProvider;
    }

    Sorry for the bad English...

    Hello

    You can try using xml as the dataprovider of the Menu bar instead of going for the Arraycollection collection.

    Thank you

    Roman

  • Could not create constants/controls/indicators from the XML parser

    Is there a reason I can't create a constant/control/indicator of the XML parser function ref (by right clicking)? I need to make the Subvi in build/read xml files, and it's really impossible without this ability.

    LabVIEW 2012 f3

    This bug has already been reported (CAR 357092) and should be corrected in the next service pack release. For now, here is a workaround:

    "" "" "1. create an indicator of reference from functions ' programming ' file IO" XML "XML parser" New.vi.
    2. right click on the new terminal of indicator 'DOM Document Out' and select Create > command (or indicator).

    3. right click on the new indicator of control / and choose Select XML Parser Class. Then you can choose what class you need.

  • list - restrictive entry visibility and external xml file in the drop-down list

    The question applies to the OPA 10.1, but if a solution requires a version more recent OPA (e.g., 12.1) we can update so please let me know what version your answer applies to.

    I have a series of tabs of a spreadsheet Excel that map different categories on each other and I want to implement this OPA so that there are six screens with drop-down lists and visible elements two on-screen menu will depend on the selected item in the display 1. list to display 3 items will depend on the selected item in the screen 2, which depends on the item selected on the screen 1, etc..

    For example,.

    1 screen can be States:

    Maryland

    Virginia

    New York City

    Georgia

    ...

    2 screen could then be counties: assuming that Virginia has been selected...

    Accomack

    Albemarle

    Alleghany

    ...

    3 screen could be cities: assuming that Accomack is selected...

    Exmore

    Parksley

    ...

    Basically I have large spreadsheet list of lists with items (one list a 2040 pieces) and so I can't manually enter easily list items.  I would like to 'specify the name of the list' and have the OPA to use an xml list (easily created my spreadsheet), but the OPA Help menu says "NOTE: this implementation of the xml list does not support default values or visibility...» "So it seems that I won't be able to make invisible inapplicable list items.  So, to use the fictitious example above, if I chose the State of Maryland, I will not applicable to Virginia or any other State counties, but Maryland is visible; Yet, all counties in the country should be included in the list in the first place.

    If someone knows a solution or another solution to this problem (other than creating custom functions) so please let me know.

    "Out of the box' for 10.1 you can try the following:

    Have simply a separate list for each of the sub-components. He can do even a little painful, but you have not at least custom functions or custom controls.

    On the first screen you have the attribute collection the State using the list of States (provided via xml).

    On the second screen you have the County collection attribute - but repeated 50 times - and then use visibility to show/hide the template you want (which then has the correct xml for the counties in the State).

    On the third screen you have your attribute for the city (once again the same attribute for each list) but isn't there it gets a little mean to 50 times counties in the State.

    In terms of writing that required visibility rules that you can probably leverage Excel to do much of the building of the rule for you to lists (remembering that the compiler takes that you as the user see in Excel, not the function that sees Excel)- so there is not a lot of extra work in the perspective of rules.

    The sticking point will simply put all of these attributes and binds the attribute visibility for the right control (and right xml).

    Proceed with caution (extreme!), but... If you're already Automation to create the XML lists from Excel, then you might want to automate the creation of xml screen. But be very careful. I've seen some projects that have used automatically generated screens and they did the job of the ok - but certainly a warning any time major health you do not use OPM to generate a component of OPM.

    Then... it is possible to do it manually - but you probably want to get involved some automation.

  • How to get the break control file in the xml editor

    Hi all

    I use oracle Apps r12 and Bi publisher 10g.

    I followed these steps to burst Xml reports

    http://apps2fusion.com/apps/21-technical/251-xmlp-concurrent-program-revisited-with-bursting.

    I created the definition of data and now I need to reach the break control file.

    If the system will generate burst control file after the creation of data definition, or to create a control file.

    Thanks and greetings
    Srikkanth.M

    You must create a control file and upload it.
    You can also check this blog for detailed steps http://garethroberts.blogspot.com/2008/03/bi-publisher-ebs-bursting-101.html

  • If you have any with the itemrender have a control label and onther a gri data

    Hi friends,

    If you have any with the itemrender have a control label and onther a data grid control.

    In my application, I used list control. The list control's item converter. In my case if I click on the name list control, releated data corresponding to the data grid need to view and control the list as label.

    < mx:List width = "750" id = "Lst_userlist" verticalScrollPolicy = "off" horizontalScrollPolicy = "off" rowCount = "20".
    labelField = "sec_user_first_name + sec_user_last_name" labelFunction = "BindUserName" buttonMode = "true" itemClick = "Click_UserList (event)" > "

    < mx:itemRenderer >

    < fx:Component >

    < mx:VBox horizontalScrollPolicy = "off" verticalScrollPolicy = "off" >

    < s:Label id = name = "{data .sec_user_first_name + data .sec_user_last_name 'lbl_userhead'} ' buttonMode ="true"color =" #000000 "/ >" "

    < mx:DataGrid height = "100%" id = "membershipGrid" alternatingItemColors = "[#DCDCDC, F8F8FF #]" "5" paddingLeft = horizontalScrollPolicy = "off" color = 'black '.
    horizontalGridLines = "false" verticalScrollPolicy = 'auto' verticalGridLines = rowCount = "{membershipArrColl.length 'false'}" rowHeight = "25" "
    borderSkin = "{null}" showHeaders = 'true' borderVisible = "false" dataProvider = "{membershipArrColl}" width = "750" visible = "false" includeInLayout = "false" >

    < mx:columns >
    < mx:DataGridColumn width = "180" headerText = "Name" minWidth = "150" sortable = "true" wordWrap = "true" >
    < mx:itemRenderer >
    < fx:Component >
    < mx:HBox horizontalScrollPolicy = "off" >
    < fx:Script >
    <! [CDATA]
    override public function set data(value:Object):void {}
    Super.Data = value;

    if(Data.home_sec_organization_id==Data.sec_organization_id)
    {
    FileImg.Load ("/ist_shared/ist_images/ist_icons/Modern/gif/16/hot/user_favorites_16_hot.gi f");
    }
    on the other
    {
    FileImg.Load("/ist_shared/ist_images/ist_icons/Modern/gif/16/dis/user_remove_16_dis.gif");
    }
    lbl_Gridcloumn_name. Text = Data + .sec_user_first_name""+ data.sec_user_last_name;
    }

    []] >

    < / fx:Script >
    < mx:Image id = "fileimg" buttonMode = "true" toolTip = "This is organization at the home page of the user" / >
    < s:Label id = "lbl_Gridcloumn_name" width = "200" buttonMode = "true" textDecoration = "underline" toolTip = "User Menu [{data.sec_user_name}]" click = "outerDocument.Click_Name (event); »    / >

    < / mx:HBox >
    < / fx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >
    < mx:DataGridColumn width = "120" minWidth = "110" headerText = "Username" sortable = "true" dataField = "sec_user_name" / >

    < mx:DataGridColumn width = "100" minWidth = "80" headerText = "OrgName" dataField = "sec_org_name" >

    < / mx:columns >

    < / mx:DataGrid >



    < / mx:VBox >
    < / fx:Component >

    < / mx:itemRenderer >
    < / mx:List >

    Please help a whole for me...

    Thank you

    Mamoudou R.

    If I understand correctly, you want to display a different set of data in a DataGrid control for each selected item in a list?

    I would just use link:

    
    
    

    This assumes that this list is filled with the data elements in a format similar to this:

    {

    label: "Label 1 list."

    data:]

    {col1: "col1", col2: "col2"},

    {col1: "col1", col2: "col2"},

    {col1: "col1", col2: "col2"}

    ]

    }

  • Control SMART and short CIOS not installed? New notebook

    Hello

    My parents sent me the 4440 s of HP Probook. I turned it on and it was working fine. No problem at all, but the hard drive was very small. Only 59 concerts. So, I took the hard drive from my old laptop (which still works. 300 concerts) and put it in the new laptop. When I turned it on this pop up.

    HP PC Hardware Diagnostics UEFI

    -----------------------------------

    Version 1.6.0.0 - BIOS

    then it gives me the opportunity to perform a verification of memory, hard disk check, language and output. Memory passes test, but when I do the hard disk (quick audit and comprehensive check) check it says controls SMART and short CIOS not installed.

    When I click on leave peripheral saus to boot not found, please install system of operating on hard drive.

    Here is some of the best. I took the hard drive out and put the new hard drive and little return in the new probook, and the same message appears. I don't know why. I can't figure out what it could be. My father-in-law has a good knowledge of computers, but unfortunately, on the phone it cannot be a great help.

    Someone save my new laptop beautiful!

    The diagnostic program has done a small partition on the hard drive to it. When you have removed it, so that has UEFI. You need to reinstall as the only one available is the one stored in the BIOS.

    Here's that and your BIOS update.

    This is for Windows 8.1 as you say this is a brand new, that is my logical guess.

    http://h20565.www2.HP.com/portal/site/hpsc/template.page/public/PSI/swdDetails/?sp4ts.Oid=5269090 & spf_p.tpst = swdMain & spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_125646_1%257CswEnvOID%253D4158%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument & javax.portlet.begCacheTok = com.vignette.cachetoken & javax.portlet.endCacheTok = com.vignette.cachetoken

    UEFI: http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=5269090 & spf_p.tpst = swdMain & spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_125304_1%257CswEnvOID%253D4158%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument & javax.portlet.begCacheTok = com.vignette.cachetoken & javax.portlet.endCacheTok = com.vignette.cachetoken

    I hope this helps. I used the basic model for it, and it should work. If you have any problems, send the product so that we can check the cross. However, there should not be a problem.

    JHS

  • How to: open the control panel and check if Windows Update settings in Windows 8

    If you're running Windows 8 and you are not sure if you get the latest updates and patches Windows updates then the following video should help. It guides you through opening the control panel and how to check your Windows Update settings.

    Remember, make sure that Windows 8 is up-to-date on your computer, you must have the latest updates of Windows installed.

    You may also need to make sure that your computer is updated the software and drivers for your hardware or to trobleshooting purposes make sure it isn't updated drivers for your hardware. Here is a video that will show you how.

    I hope everyone finds these helpful videos. If you have any questions leave a message below. Remember, it is advisable to have the active Windows updates, however, there are certain circumstances (for example, troubleshooting) disable it temporarily is a good idea.

  • Space required on target RT for LabVIEW Control design and Simulation

    Hello

    I want to run a DLL file on an RT target using LabVIEW Control design and Simulation, but I'm not sure of the required amount of RAM on the RT-target. My RT-target options are respectively cRIO 9002 and cRIO-9004 with 32 and 64 MB of RAM. Is this a sufficient amount of RAM to run the simulation? ¨¨

    Thanks in advance

    This will depend on the size of your dll, the size of the rest of the code, you can create other necessary drivers/modules, memory use when your application runs, etc.

    9002 and 9004 have not a lot of RAM on them and the minimum software installation to run a control application Design & Simulation (CD & Sim) will take around 22Mo of it (the majority of RAM available to the 9002). It would be possible to run your application on these two controllers if you keep it small but it will depend on what you want to do.

  • Live PID missing under Header Control Design and Simulation

    Hello

    I have currently the full version of the University of Labview 2009, but the PID screws are missing. I understand that they are under Control Design and Simulation, but there is nothing in this topic.   In addition, an image of my license manager OR is attached to show which is enabled.  Any ideas?

    Thank you

    The PID toolkit is part of the Developer Suite DVD.

    You have the following Professional Developer?

  • Is there an easy way to add text to a chain control / indicator and keep the colors

    Hello

    Bassically I want to add text to a chain control / indicator without losing the formatting of the previous text.

    For a part of a program that I create, data will be transmitted to and from a serial device. I want to display this data in a chain control / indicator and change the color of the text of certain strings depending on data type (sent, received). Basically as a nice log window.

    At the moment, I update the chain control / indicator by reading the text and concatenated with the new string. However, this method removes the colors of previous text :-(

    Is it possible to add data to the control of the chain / indicator without losing the text previous formatting?

    I started to create a sub vi who reads a text both character and adds a new element in an array (offset color and text), if the color is distinguished by the previous character. Only problem is it seems to be quite time CPU.

    Thanks in advance,

    Matt

    MattB-5906 wrote:

    Is it possible to add data to the control of the chain / indicator without losing the text previous formatting?

    Actually, no. This means that you will have to use workarounds. Your workaround solution seems a bit involved. Basically, all you need to do is just to keep track of the pairs of end start/selection selection that must be colored in a table. Then just you loop in this table to color the text marked by the power positions.

    An alternative is to use a different indicator. Rather than an indicator of the string, you can use a table with a column. You can then set the foreground color on a cell by cell basis, and add a new line (row) will not affect the coloration of the previous lines.

  • There is no tools in the control design and simulation its Blanck

    There are no tools in control design and simulation its Blanck. I saw the same question asked before and found a solution that, if we install 32-bit labview then all options will be available. I installed labview of 32 bits, but the result is the same. Please help me thanks in advance...

    So yes, I think that it is possible to use this tool as a trial.

    but you have to install after installing LabVIEW.

  • Control Design and Simulation Tutorial

    Hello

    I begin with a course that requires the use of the Control Design and Simulation functions. Before asking stupid questions, I want to see the hand on the tutorial, it is referenced in this white paper.

    http://www.NI.com/white-paper/5855/en/

    However the link to the tutorial ftp does not work, someone else has an alternative link, or could buy the tutorial directly.

    I appreciate any assistance.

    Kind regards

    Danny

    Try again... Earlier, I was able to download the zipped file

  • Control design and Simulation palette is not displayed

    I'm using LabVIEW 2009 professional degree. I installed the Control Design and Simulation Module with its other tools required. The problem is that Control Design and Simulation palette does not appear in the Palette of functions in any VI. Please help me with this.

    Adeel Amin

    NED Université engineering & technology

    If you run the License Manager, expand LabVIEW2009 > Modules > Control Design and Simulation.Can you make sure you have this directory and what is the color of the cube just next door?

  • My speakers on my Dell Latitude D820 suddenly emit only a low sound. I adjusted all the volume controls in the menu sounds from the Control Panel, and there is no change in volume.

    Low sound volume

    My speakers on my Dell Latitude D820 suddenly emit only a low sound. I adjusted all the volume controls in the menu sounds from the Control Panel, and there is no change in volume. It's real power radio on the internet and play music from a CD inserted into my machine. The sound icon does not appear in the toolbar.  I tried the fixit of automatic Wndows and it ran and said low volume has been set. Not the case.

    Hello

    1. what operating system do you use?

    2 did you change on your computer?

    Method 1:

    I suggest you follow the link and check.

    No sound in Windows

    http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows?T1=tab02

    Method 2:

    I suggest to follow the link and search for the volume in the taskbar.

    (a) right click on an empty area of the taskbar and then click Properties.

    (b) in the Notification area, click Customize.

    (c) select the volume see the icons and taskbar notifications check box, and then click OK.

    I also suggest you to follow the link and check.

    Change icons appear in the notification area

    http://Windows.Microsoft.com/en-us/Windows7/change-how-icons-appear-in-the-notification-area

Maybe you are looking for