Fill Combobox with nested XML

Hello!
How can I fill a ComboBox with an XML retrieved via a HTTPService?

My XML looks like

<? XML version = "1.0" encoding = "iso-8859-1? >
< xml >
< node label = value '1' = 'a' / >
< node label = value "2" = "b" >
< node label = "21" value = "ba" / >
< node label = '22' value = 'bb' / >
< node label = "23" value = "bc" / >
< / node >
< node label = '3' value = 'c' / >
< node label = "4" value = "d" / >
< node label = '5' value = 'e' / >
< / xml >

The output you want in the drop-down list would be

one
b
-ba
-bb
Colombia-British
c
d
e

< mx:ComboBox id = "selectedLevel" dataProvider = labelField 'structure of {}"="label"/ >

'structure' is an XMLListcollection, looks like my Resulthandler

structure = new XMLListCollection (event.result.node);


Can someone give me a hint what is missing?

Thank you.

Tags: Flex

Similar Questions

  • Fill ComboBox with XML data

    I would like to fill a ComboBox with data in a simple xml file like this. It's probably quite newbie question, but I couldn't find the answer to the search in this forum and the documentation up to date.


    < root >
    option 1 < item > < / item >
    option2 < item > < / item >
    Option3 < item > < / item >
    < / root >


    I would be very grateful if someone tell me how the ComboBox control to retrieve data from XML file. Thank you!

    I found a way to do it. Here is the code I use to populate a ComboBox control with dynamically loaded XML data (the XML content is in the first post).
    I'm sorry that I have opened a topic for this fundamental question. In any case I hope that the thread is useful for someone. If you think that there is something wrong with the code below, please post a reply.



    http://www.Adobe.com/2006/mxml"creationComplete ="parseXML (); » >


    public var myXML:XML
    public var myLoader:URLLoader

    function parseXML (): void {}
    myXML = new XML();
    var XML_URL:String = 'content.xml ';
    var myXMLURL:URLRequest = new URLRequest (XML_URL);
    myLoader = new URLLoader (myXMLURL);
    myLoader.addEventListener ("complete", xmlLoaded);
    }

    function xmlLoaded(evtObj:Event):void {}
    myXML = XML (myLoader.data);
    combo.dataProvider = myXML.children ();
    }

    ]]>




  • fill combobox to an xml file

    I'm trying to fill a combobox with data from an xml file, this is supposed to be a simple right to face, but for some reason I can't get it to work. That's what I do:

    I found a solution!

    I don't understand the logic behind it, but it works!

    "I removed the dataProvider ="{cbData}"and labelField="@label "attributes of the

    private void lookUpDataHandler(evt:ResultEvent):void {}
    denomination.labelField = "label";
    denomination.dataProvider = evt.result.allrows.singlerow;
    }

    I someone can explain the reason why the previous code does not work, please do so.

  • Fill combobox with multiline field

    Is it possible to get a picture of a multiline text field and put this table in a ComboBox?

    I think I should use the split() function, but I don't know how to do this.

    I'm trying to find an easy way to populate a combobox control.

    This topic shows how you can split the value of the value of a field text multiline in carriage returns: http://forums.adobe.com/thread/789976

    You can then use the field setItems method to fill the list box with items area: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.752.html

  • Fill ComboBox with HTTPService object

    I can't for the life of find me a good example of how call a doc by HTTPService xml, then use the data to populate a combobox control. Can someone help me with this please?

    Here's what I have so far.

    Part of the XML
    <? XML version = "1.0" encoding = "utf-8"? >
    < albumdirectory >
    < id album = details '1' = "Our trip home in 2005." >
    < title >
    Cottage 2005
    < /title >
    < safety pin = "" / > "
    < photos >
    < photo details = "" > assets/gallery/nature01_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature02_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature03_sm.jpg < / photo >
    < photo details = "" > assets/gallery/nature04_sm.jpg < / photo >
    < / photos >
    < / album >
    < / albumdirectory >

    Now, here's what I have so far for the flex code.

    < mx:HTTPService
    URL = "Assets/albums. XML ".
    ID = "albumXML".
    showBusyCursor = "true" / >

    < mx:ComboBox width = "100%" height = "8%" id = "albumBox" dataProvider = "{albumXML.lastResult.albumdirectory.album}" labelField = "title" > "

    < / mx:ComboBox >

    Any help on how I can get this fact would be great! Also good resources on "How-to" small snippets would be nice too.

    Thanks for your time

    OK sorry, it works. It was actually my xml that has been ruining things.

  • Fill ComboBox with external data

    I have this drop-down list box:

    < mx:ComboBox change = "changeEvt (event)" x = "134" y = "48" > "
    < mx:Array >
    < mx:Object label = 'AM' data = 'ALL' / >
    < mx:Object label = "BM" data = "CM" / >
    < mx:Object label = "CM" data = "FROM" / >
    < / mx:Array >
    < / mx:ComboBox >

    I would like to do this fill a XML file, for example I import

    < empTypes >
    < laborClass lc = 'AM' <>/.
    < laborClass lc = 'BM' <>/.
    < laborClass lc = 'CM' <>/.
    < / empTypes >

    .. .in an XMLList, named said "empTypes" what is the syntax I use for this insert in the comboBox? I don't know how to do so that he can enter.

    M.

    I changed it to filter1=event.currentTarget.selectedItem.@lc; and that the time seems to work :)

  • Line chart with nested &lt; XML &gt; node

    Hello

    I use a Flex 3 line chart.

    The table gets its data from a remote through < mx:HTTPService > as XML file:

    < mx:HTTPService id = "myServ" url = "MyChartData.xml" / >

    I want the chart to draw for all nodes that fall under each set of nodes for the < node > values:

    nodes <>

    < nodeset id = "1" >

    <>node

    <>node

    < / nodeset >

    < nodeset id = "2" >

    <>node

    <>node

    < / nodeset >

    < / node >

    The graph is get mapped out when I use the dataProvider for only the first internal as node:

    myServ.lastResult.nodes.nodeset [0] .node

    How to get the graph plotted for all interior nodes?

    The mxml:

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

    < mx:LineChart id = "myChart" width = "100%" height = "100%" showDataTips = "true" dataProvider = "{myServ.lastResult.nodes.nodeset.node}" >

    < mx:horizontalAxis >

    < mx:CategoryAxis categoryField = "time" title = "Node value" / >

    < / mx:horizontalAxis >

    < mx:verticalAxis >

    < mx:LinearAxis title = "Interval" / >

    < / mx:verticalAxis >

    < mx:series >

    < mx:LineSeries id = "myLineSeries1" xField = "time" yField = "value" / >

    < / mx:series >

    < / mx:LineChart >

    The XML code example:

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

    <? XML version = "1.0" encoding = "utf-8"? >

    nodes <>

    < id nodeset = "1" >

    < period node = "01" >

    < value > - 115 < / value >

        </node>

    < period node "02" = >

    < value > - 115 < / value >

        </node>

    < period node = "03" >

    < value > - 114 < / value >

        </node>   

    < period node '04' = >

    < value > 0 < / value >

        </node>

    </nodeset>

    < nodeset id = "2" >

    < period node '05' = >

    < value > - 114 < / value >

        </node>

    < period node "06" = >

    < value > 0 < / value >

    < / node >

    < period node "07" = >

    < value > 0 < / value >

    < / node >

    < period node '08' = >

    < value > 0 < / value >

        </node>

    < / nodeset >

    < / node >

    HTTPService.resultFormat = "e4x";

    The default value is object that will play not well what attributes. XML would work too, but e4x extends with a few useful shortcuts.

  • Fill ComboBox with an HTTPService object

    Hello
    I don'understant why it is not possible to get the Periodname of data field in my comboBox.
    Here is the XML returned by a php script

    < time >
    < period >
    HS summer < Periodname > < / Periodname >
    < debutPeriode > 2006 - 06 - 15 < / debutPeriode >
    < finPeriode > 2006 - 09 - 15 < / finPeriode >
    < / period >
    < period >
    < Periodname > fall < / Periodname >
    < debutPeriode > 2006 - 09 - 15 < / debutPeriode >
    < finPeriode > 2006 - 11 - 21 < / finPeriode >
    < / period >
    < / periods >

    and in my mxml file
    < mx:ComboBox = "183" x = "10" width = "120" id = "Cperiode" dataProvider = "{resperiode.lastResult.periodes.periode.nomPeriode}" > < / mx:ComboBox >

    I have this error:
    Error: Unknown property: 'Periodname '.

    If I remove Periodname I have a list of object in my combo.
    How can I get Periodname in the drop-down list?
    Sorry for my English
    Thank you for your answer

    Try changing the dataProvider and adding the labelField like this:

    The default value of comboBox for the labelField is "label", tell him that you use a different value, Periodname.

    Vygo

  • Fill ComboBoxes with some Date Formats

    Hello, I need to show the day, month and year in three separate ComboBoxes for my project. Is it possible to combine and concentrate all ComboBoxes together?  For example, I want to get all the values for the Date of the birth of three days of combo boxes, month and year.

    Can someone help me please?

    If you want your users to select date, month and year of your 3 comboboxes?  If so, you can use the following syntax and access the properties of the 3 comboboxes selectedLabel:

    Import fl.data.DataProvider;

    import flash.events.Event;

    var month is ["jan", "feb", "mar", "Apr", '' may '', "jun", "Jul", "aug", "sep", "oct", "nov", "December"];.

    var dp:DataProvider = new DataProvider (monthA);

    monthCB.dataProvider = dp;

    var dataA:Array = [];

    setDatesF (31);

    function setDatesF(n:int):void {}

    for (var i: int = 1; i<=n; i++)="">

    dataA.push (i);

    }

    DP = new DataProvider (dataA);

    dateCB.dataProvider = dp;

    }

    var yearA:Array = [];

    for (var i: int = 1900; I)<2100; i++)="">

    yearA.push (i);

    }

    DP = new DataProvider (year);

    yearCB.dataProvider = dp;

    monthCB.addEventListener (Event.CHANGE, monthF);

    function monthF(e:Event):void {}

    var d: Date = new Date (yearCB.selectedLabel, 1 + monthA.indexOf (monthCB.selectedLabel), 0);

    setDatesF (d.date);

    }

  • Fill a ComboBox with actionscript

    I'm currently learning Flash 8 Pro by working my way through a book "Teach Yourself Flash 8' and met an teaching example that does not work." The (very basic) THAT the code needs to fill three lines of a ComboBox (with the instance name "MaZoneDeListeDéroulante"). I rechecked the syntax against that in the tutorial and it fits precisely. However, test results the film in errors such as:

    * Error * scene = scene 1, layer = Layer 1, frame = 1:Line 3: there is no method with the name "removeAll.
    and
    * Error * scene = scene 1, layer = Layer 1, frame = 1:Line 4: there is no method with the name "addItem".

    Can someone help a total Flash beginner who is unsure whether the error is in the tutorial or in its own implementation of it? Or even if there is something wrong with my installation of Flash? I'm learning this step tiny stuff at a time and I'm not convinced to go ahead until I have this problem to be resolved. Shaky foundations and all that.

    Thanks in advance.

    Here's the code AS I use:

    It is resolved. Turns out that I needed to delete the ASO files. I would have never known about this on my own, so thanks a lot go to the author, Phillip Kerman for her help.
    In any case, it is done and dusted.

  • Spark Combobox with dataprovider is empty

    There seems to be a bug when using a candle with an empty dataprovider combobox.  The idea is to have an empty combobox that adds all entries in the dataprovider for each group entered.  Attached is a simple project to demonstrate.  The first combobox has a dataprovider to the color 'Red', 'green', 'Blue' in it.  No matter what type in the box, whether it's an existing element or a new one, it displays in the label below.

    The second combobox has a dataprovider that is currently empty.  Anything by typing in the box and pressing on enter does absolutely nothing.  There is no way to get the value entered in the combobox control now.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
          xmlns:s="library://ns.adobe.com/flex/spark" 
          xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
     <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <s:Panel x="10" y="10" width="250" height="200" title="Combobox with dataprovider">
      <s:ComboBox x="10" y="10" width="228" id="cbFull">
       <s:dataProvider>
        <s:ArrayCollection>
         <fx:String>Red</fx:String>
         <fx:String>Green</fx:String>
         <fx:String>Blue</fx:String>
        </s:ArrayCollection>
       </s:dataProvider>
      </s:ComboBox>
      <s:Label x="7" y="37" text="Selected Item: "/>
      <s:Label x="94" y="37" text="{cbFull.selectedItem}"/>
     </s:Panel>
     <s:Panel x="268" y="10" width="250" height="200" title="Combobox with empty dataprovider">
      <s:ComboBox x="10" y="10" width="228" id="cbEmpty">
       <s:dataProvider>
        <s:ArrayCollection/>
       </s:dataProvider>
      </s:ComboBox>
      <s:Label x="15" y="41" text="Selected Item: "/>
      <s:Label x="102" y="41" text="{cbEmpty.selectedItem}"/>
     </s:Panel>
    </s:Application>

    Fill out a bug with your test case report.

  • Creation of ComboBox with the values of the fields

    Hey everyone, it's been a while since my last post.

    I spent some time trying to fill a ComboBox with the values of the 3 fields of different form of google and I was wondering if someone could tell me on common sense.

    Thanks a lot for any idea!

    the general idea would be something like this:

    Get added to a table field values

    var aItems = [];

    aItems.push (getField("Text1").valueAsString);

    aItems.push (getField("Text2").valueAsString);

    aItems.push (getField("Text3").valueAsString);

    Fill the drop-down list with the elements box

    getField("combo1").setItems (aItems);

    Replace domain names with real field names that you use.

    You can start the list with an element that is a single space (if it appears empty) or something like "- select -". You can also make sure you add all the duplicate entries, which would happen if all the field values are the same.

    When did you want this script to run?

  • Query to generate nested XML flow

    Hello
    I use Oracle 11 g R2 SOE...

    I have two main tables

    COMMERCIALS_PROPERTIES (PK, com_id, com_size, project number, com_type number number number)
    COM_PHOTOS (PK ID number, number com_id FK, content mimetype varchar2, blob)

    Please, note that the following has nothing to do with my problem:
    CONTENT and mimetype columns. In addition, the tables of research: PROJECTS, COM_TYPE

    I exposed a report as a RESTful web service in XML format:

    I use this query to generate the XML 1 feed, but I need to change the query to generate flow XML 2 .

    How is this possible?
     Select
          
    "COM"."COM_ID" as "COM_ID",
    "COM"."COM_SIZE" as "SIZE",
    "PROJECTS"."PROJECT_NAME_EN" as "PROJECT",
    "COM_TYPES"."COM_TYPE" as "COM_TYPE",
    
    'http://fam-erp.com/apex/erp/fateh/'||IMG.ID as "ImgURL"
    
     FROM 
    COM_PHOTOS IMG inner join COMMERCIALS_PROPERTIES "COM"
    on   IMG.COM_ID = COM.COM_ID
    inner join "PROJECTS" "PROJECTS" 
    on "PROJECTS"."PROJECT_ID"="COM"."PROJECT_ID"
    inner join "COM_TYPE_LOOKUP" "COM_TYPES" 
    on "COM_TYPES"."TYPE_ID"="COM"."COM_TYPE"
         
     WHERE
      COM.COM_ID < 80 order by 1
    H1. XML 1
    H2. Please look only < COM_ID > and < ImgURL >
    <ROWSET>
    <ROW>
    <COM_ID>77</COM_ID>
    <SIZE>842</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <ImgURL>http://fam-erp.com/apex/erp/fateh/1410</ImgURL>
    </ROW>
    
    <ROW>
    <COM_ID>77</COM_ID>
    <SIZE>842</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <ImgURL>http://fam-erp.com/apex/erp/fateh/1412</ImgURL>
    </ROW>
    
    <ROW>
    <COM_ID>78</COM_ID>
    <SIZE>756</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <ImgURL>http://fam-erp.com/apex/erp/fateh/1425</ImgURL>
    </ROW>
    
    <ROW>
    <COM_ID>78</COM_ID>
    <SIZE>756</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <ImgURL>http://fam-erp.com/apex/erp/fateh/1429</ImgURL>
    </ROW>
    
    </ROWSET>
    ---------------------------
    H1. XML 2
    H2. Please look only < COM_ID > and < Images > and < ImgURL >
    <ROWSET>
    <ROW>
    <COM_ID>77</COM_ID>
    <SIZE>842</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <Images>
          <ImgURL>http://fam-erp.com/apex/erp/fateh/1410</ImgURL>
          <ImgURL>http://fam-erp.com/apex/erp/fateh/1412</ImgURL>
    </Images>
    </ROW>
    
    <ROW>
    <COM_ID>78</COM_ID>
    <SIZE>756</SIZE>
    <PROJECT>Bayswater Tower</PROJECT>
    <COM_TYPE>Office</COM_TYPE>
    <Images>
            <ImgURL>http://fam-erp.com/apex/erp/fateh/1425</ImgURL>
            <ImgURL>http://fam-erp.com/apex/erp/fateh/1429</ImgURL>
    </Images>
    </ROW>
    </ROWSET>
    
     

    Fateh,

    I really doubt if the nested XML can be generated from one part of the report. The and tags to link to a generic XML generator that takes a select as input. Just like SYS_XMLGEN or DBMS_XMLGEN.

    You will need find an alternative mechanism for the nested XML.

    Below are the 2 links to help you started on its SQL. For deployment, you can use ApexListener ResourceTemplates, if you use ApexListener.

    If you are on 4.2 Apex and ApexListener 2.0EA, then you have more options that you can set the modules of RESTful services in SQLWorkshop.

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4980337843276
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:P11_QUESTION_ID:11650482108651

    Kind regards

  • ComboBox with default selected item

    Hello

    I try to view combobox with an item selected by default. Is it possible to use instead of selectedIndex selectedItem to achieve?

    Here is the code and I want User2 to be selected by default:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"xmlns:local =" * "> "
    < mx:HBox id = "box" >
    < text mx:Label = "user:" / >
    < mx:ComboBox prompt = "Select" selectedItem = "User2" >
    < mx:dataProvider >
    User1 < mx:String > < / mx:String >
    User2 < mx:String > < / mx:String >
    < mx:String > user3 < / mx:String >
    < / mx:dataProvider >
    < / mx:ComboBox >
    < / mx:HBox >
    < / mx:Application >

    Please let me know if this is possible?

    Thank you

    You must pass a String OBJECT as a selectedItem.

    following code works:

    http://www.Adobe.com/2006/mxml '.

    "" layout = "absolute" xmlns:local = "*" >

    User1

    User2

    Util_3

  • ProcessGPORegistryPolicy: Detected the error 87 when filling registry with settings in the file to archive temporary.

    I'm seeign as below errors in gpsvc.log and gpupdate/force fails with the error below.

    "Processing of Group Policy failed because of internal system error".

    RSOP appears in the confiuration computer, registry error, Unspecified.

    ProcessGPORegistryPolicy: Detected the error 87 when filling registry with settings in the file to archive temporary.

    SetRegistryValue: Could not open the key < software\policies\microsoft\windows\windowsupdate\au=""> 87

    Could you please help in investigating it?

    Concerning

    Murali

    Hello

    I suggest you to send your request in the TechNet forums.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    http://social.technet.Microsoft.com/forums/en/categories

Maybe you are looking for

  • Impossible to edit documents after installing AVG

    I have a Toshiba laptop dual drive, which has been recntly upgrade Vista to Windows 7. Windows 7 has taken over most of my C drive, so I had to put programs on the other disk of data E. The other day I bought AVG Antivirus 2011 on my computer (e data

  • Tecra A10 - cannot install usb panasonic TDA drivers

    Hello I recently bought a laptop Tecra A10 on which I decided to exercise the choice of vista downgrade to windows xp pro.I am trying to connect to a system of telephone panasonic TDA via USB. When you try to install the drivers, the system ends by c

  • read mixed type C binary file

    Hello I have the script program, which can produce the desired data in csv, ASCII and binary file format. Sometimes not all of the useful numbers are printed in the csv file, so I need to read data from the binary file. I have atttached what I have s

  • Parameters of gamma T231H

    Hello. I looked in the manual and have not found how to calibrate the gamma for that monitor (touch screen T231H). I have not found any setting in the OSD of builtin then I imagine that among the other monitors, T231H have no gamma calibration. Am I

  • How to accpet Movie Maker with Windows XP MP4 files?

    I'm afraid of downloading additional software on the web to allow my files MP4 work with Movie Maker.   If it was a patch from Microsoft, directly from Microsoft, I téléchargerais it, but simply download something of a place that I'm not familiar wit