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 ();
}

]]>




Tags: Flex

Similar Questions

  • 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 :)

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

  • Is there a way to access the HTML data as you can do with XML data?

    I am new to AS3 and I'm trying to figure out how to access HTML as you can with the XML data?

    HTML isn't XML, nor is the DOM supported as JavaScript does, so you'll have to go with the typical string operations. If it's on a website, you can use JavaScript to make the analysis of DOM for you in HTML via AJAX loading and working back and forth between JS<->As.

    Otherwise the Interior HAVE only, Regular Expressions are most useful for this. The HTML code in a viable XML structure analysis may be possible when it is not applying the same syntax rules it and is of a dynamic nature. For example, it is perfectly valid to put the content in a page that is not nested inside a tag, for example

    some paragraph

    Some text let only locked in the body. You need detect possible syntactic questions and manage all of them. Channel ops are much easier.

    Any specific markup? you have trouble to detect/work?

  • DSC with XML data type

    Hello

    Can someone explain to me what the difference is between the xml data type and the type of Document data in workbench? I would use the xml datatype in my DSC thinking that it's probably the best representation of an xml string. But I heard that the Document is more widely used and it can represent an entity xml as well. Is this good?

    My ultimate goal is to write a DSC and use a type representing an xml string. I would like that the component.xml of the type for my input variables automatically be typed 'xml' or 'document' (whatever that I should use).

    I tried to create variables of both types ("xml" and "document", lowercase d) and those who have passed in my DSC for inspection. The object passed are as follows:

    XML: org.apache.xerces.dom.DocumentImpl

    Document: com.adobe.idp.Document

    But if I use one of these in my component.xml workbench is to type my variables as 'DocumentImpl' or 'Document '.

    Any ideas?

    Thanks in advance!

    NIC

    Yes. I am it would be showing the xml for the variable type, but it shows Document in both cases. But they are different. One is an org.w3c.dom.Document and the other is a com.adobe.idp.Document.

    So I guess, try to use a title for this setting that reflects the nature of the variable you are trying to use.

    Also, you can use the tag to put a little more explanation on the type of variable you want to use.

    Jasmine

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

  • ComboBox with multiple data?

    Please bear with me, I'm sure it's very simple to answer and I'll look quite stupid, but I'm new to Flex, actually I am new to programming treat all together both me some what of a simple peasant.

    I am trying to write a small application that is able to calculate the weight of a publication. To do this, I need to let the user type in the width and height, so I can work on the total area. The application can be used by - how can I put 'non technical' good people so I need to make it easier to use, but with the possibility for users to advance more to type in exact measurements.

    To provide this functionality, for I created two digital Steppers, the width and the other for the height, I have also provided a Combobox that currently lists only A6, A5 and A4. If a user selects one of the following options, it changes the width and height of the Steppers digital values to display the correct measurements for A6, A5 or A4.

    I do this with the following code (extract):

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    public var paperSizes:ArrayCollection = new collection ArrayCollection ([{label: "A6", isoWidth:105, isoHeight:148}, {label: "A5", isoWidth:148, isoHeig, ht:210}, {label: "A4", isoWidth:210, isoHeight:297}]);

    private void closeHandler(event:Event):void
    {
    pageWidth.value = ComboBox (event.target).selectedItem.isoWidth;
    pageHeight.value = ComboBox (event.target).selectedItem.isoHeight;
    }
    []] >
    < / mx:Script >

    < mx:ComboBox x = "10" y = "10" width = "157" id = "stdPaperSizes" dataProvider = "{paperSizes}" close = "closeHandler (event); "selectedIndex ="1"/ >
    < mx:NumericStepper = "175" x = "10" width = "65" minimum maximum = "0" = "1000" stepSize = "1" value = "148" id = "pageWidth" / >
    < mx:NumericStepper = "248" x = "10" width = "65" minimum maximum = "0" = "1000" stepSize = "1" value = "210" id = "pageHeight" / >

    < / mx:Application >

    My question is that I am using the ArrayCollection for Combobox collection correctly, all of the examples I've seen have something like ArrayCollection([{label:"Value1",data:1}]), all seem to have ' data: ' but this does pass a single value, I need to pass two values, the width and height. It is the right way or is there a better way to do it? Although this works perfectly well, I can't wait to have invalid or ill-structured code.

    Thanks in advance.

    As far as I see it, I see no problem with that except for the comboBox.value property would probably return null, in this case. That, of course, in your example is unable of any consequence.

  • Problem filling tabnavigator with returned data

    I'm trying to fill a tabnavigator with data. I feel that only the first tab displays data, but each subsequent tab does not work. It seems that when you click on another tab it loses the value of 'key' past. What is the reason for this and how can I fix the value of the 'key' for all tabs?

    Thank you!


    Here is my code:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" "" < cfComponents:SizeableTitleWindow xmlns:mx = ' http://www.adobe.com/2006/mxml ' xmlns = "*".
    xmlns:cfComponents = "" com.adobe.ColdFusion.Components. * ""
    xmlns:cfDataGrid = "" com.adobe.ColdFusion.Components.DataGrid. * ""
    xmlns: Model = "" com.cfgenerated.Models. * ""
    xmlns:view = "" com.cfgenerated.views.detail.Movie. * ""
    creationComplete = "initComponent () '"
    explicitMaxHeight = "{Application.application.height - 50}" "
    title = "Details".
    showCloseButton = "true".
    Close = "WindowManager.Remove (this); ">


    < mx:Metadata >
    [Event ("change")]
    < / mx:Metadata >

    < mx:Script >
    <! [CDATA]
    Import mx.utils.ObjectUtil;
    Import mx.controls.Alert;
    Import mx.core.Application;
    Import mx.validators.Validator;
    import com.adobe.windowedApplication.managers.WindowManager;
    Import mx.rpc.events.ResultEvent;
    Import mx.rpc.events.FaultEvent;
    com.cfgenerated.models import. *;

    private var _key:Object;

    public function get keys (): Object {}
    return this ._key;
    }

    public function set {key(key:Object):void}
    This ._key = key;
    getItem();
    }

    private function initComponent (): void {}
    this.detailObject = new MovieDetailstblMovies();
    }

    /*
    Calls to the remote and managers call back Server
    */
    Gets an instance of the server item
    public function getItem (): void {}
    If (this ._key! = null) {}
    this.dataManager.getById (this._key);
    }
    else {}
    the key is null, then we create a new object for the operation 'Add '.
    this.detailObject = new MovieDetailstblMovies();
    }
    }

    private void saveItem(item:Object):void {}
    this.dataManager.save (item);
    }

    private void get_result(event:ResultEvent):void {}
    detail of the var: MovieDetailstblMovies = event.result as MovieDetailstblMovies;
    this.detailObject = details;
    }

    []] >
    < / mx:Script >

    < mx:RemoteObject id = "dataManager" showBusyCursor = "true" destination = "ColdFusion".
    source = "MyTest.Components.cfgenerated.MovieDetails.tblMoviesGateway" > "
    < name mx:method = "getById" result = "get_result (event)" / >
    < / mx:RemoteObject >

    <!-create a template using the AS value object class. With this the model mxml version, we can bind the form fields in the object. ->
    < model: MovieDetailstblMovies id = "detailObject" >
    < model: title > {tblMovies_title.text as String} < / template: title >
    < description: model > {tblMovies_description.text as String} < / model: description >
    < model: features > {tblMovies_features.text as String} < / model: features >
    < / template: MovieDetailstblMovies >

    < mx:TabNavigator width = '675' height = '408' >
    < mx:Canvas label = "Tab1" width = "100%" height = "100%" >
    < mx:Label text = "Title" x = "10" y = "10" / >
    < cfComponents:TextInputMask id = text = "{this.detailObject.title"tblMovies_title"}" width = "220" y = "36" x = "10" / > "
    < / mx:Canvas >
    < mx:Canvas label = "Tab2" width = "100%" height = "100%" >
    < cfComponents:TextInputMask id = text = "{this.detailObject.description"tblMovies_description"}" width = "351" height = "138" x = "10" y = "36" / > "
    < mx:Label x = "10" y = "10" text = "Description" / >
    < / mx:Canvas >
    < mx:Canvas label = "Tab 3" width = "100%" height = "100%" >
    < mx:Label text = 'Bonus' x = "10" y = "10" / >
    < cfComponents:TextInputMask id = "tblMovies_features" text = "{this.detailObject.features}" width = "291" height = "218" x = "10" y = "36" / > "
    < / mx:Canvas >
    < / mx:TabNavigator >

    < / cfComponents:SizeableTitleWindow >

    By default the TabNavigator only creates the contents of the first child. Try adding creationPolicy = "all" to the tag TabNavigator.

  • need help with xml data

    Hi all

    need your spiritual help once more!
    I have a table 'product' as below:

    create table product)
    product_id number (2),
    product_info varchar (4000));

    Select * from product:
    product_id product_info
    1 < ticketing > < product = 'TV' > < productservice = "shipping" > < / productservice > < / product = 'TV' > < / ticket >

    I need to get the column product_info information in a new table with 2 columns product and productservice product_details. as in: -.
    Select * from product_details:
    product_id product productservice
    1 expedition TV

    any suggestions on how to do it.
    PS-> for a product it can be several services and there may be several products for a ticket.

    Your XML file is not well formed at all (so many errors in there).

    However, if you had a valid XML code, you could do something like that...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as product_id, '' as product_info from dual union all
      2             select 2, '' from dual)
      3  --
      4  -- end of test data
      5  --
      6  select t.product_id, x.*
      7  from t
      8      ,xmltable('/ticketing/product'
      9                passing xmltype(t.product_info)
     10                columns product varchar2(10) path '/product/@name'
     11                       ,service varchar2(15) path '/product/productservice/@name'
     12*              ) x
    SQL> /
    
    PRODUCT_ID PRODUCT    SERVICE
    ---------- ---------- ---------------
             1 TV         shipping
             2 VCR        delivered
    
  • How update the relational table with XML data?

    I get XML messages that include a bunch of data items to be updated in a table. An arbitrary subset of rows is updated for each message received.

    The output of the following example is correct, but the use of the intermediate table that bothers me. The temporary table can be eliminated somehow? Or is the most reasonable way to loop just explicitly and parse the XML message and then update each row separately?

    I'm under 11.2.0.1.0.
    create table otn9test (
      id number not null primary key,
      data xmltype
    );
    
    insert into otn9test values (1, xmltype('<data>default for 1</data>'));
    insert into otn9test values (2, xmltype('<data>default for 2</data>'));
    insert into otn9test values (3, xmltype('<data>default for 3</data>'));
    
    create table otn9input (
      id number,
      data xmltype
    );
    
    column data format a30
    
    declare
      updata constant xmltype := xmltype('<root>
      <item>
        <id>1</id>
        <data>Id 1 updated.</data>
      </item>
      <item>
        <id>3</id>
        <data>Id 3 updated.</data>
      </item>
      <item>
        <id>4</id>
        <data>Id 4 updated.</data>
      </item>
    </root>');
    
    begin
      insert into otn9input
        select * from
        xmltable('/root/item' passing updata
              columns
              id number path 'id',
              data xmltype path 'data');
    
      update otn9test t set data = (
        select data from otn9input i
        where t.id = i.id
      ) where t.id in (select id from otn9input);
    
      commit;
    end;
    /
    
    select * from otn9input;
    
    /*
         ID DATA
    ---------- ------------------------------
          1 <data>Id 1 updated.</data>
          3 <data>Id 3 updated.</data>
          4 <data>Id 4 updated.</data>
    */
    
    select * from otn9test;
    
    /*
         ID DATA
    ---------- ------------------------------
          1 <data>Id 1 updated.</data>
          2 <data>default for 2</data>
          3 <data>Id 3 updated.</data>
    */
    
    drop table otn9input;
    drop table otn9test;

    The temporary table can be eliminated somehow?

    You can do it with the MERGER:

    merge into otn9test t
    using (
      select id, data
      from xmltable('/root/item' passing updata
            columns
              id   number  path 'id',
              data xmltype path 'data'
           )
    ) x
    on ( t.id = x.id )
    when matched then update
     set t.data = x.data
    ;
    

    However, if you are looking for performance on large data sets, I think that the best is to use an intermediate table of XMLType (binary storage) to maintain the XML instance.

    create table otn9input of xmltype
    xmltype store as securefile binary xml;
    
    insert into otn9input values(
    xmltype('
      
        1
        Id 1 updated.
      
      
        3
        Id 3 updated.
      
      
        4
        Id 4 updated.
      
    ')
    );
    
    merge into otn9test t
    using (
    select id, data
    from otn9input,
         xmltable('/root/item' passing object_value
              columns
                id number path 'id',
                data xmltype path 'data'
         )
    ) x
    on ( t.id = x.id )
    when matched then update
     set t.data = x.data
    ;
    

    A structured XMLIndex could also help.

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

  • [Explanation necessary] Clears the listview data and fill it again with new data

    Hello

    I correctly filled a listview in c ++, data analysed and does interesting things with it. However, I am drunk stumbling, unable to find a way delete and repopulate my display of the list...

    Question 1:

     

    1. How can after I insert data in the list view, I clear the list data and run again the same method (init) who populated the list view with the data in the first place?

    Here are the docs that I referenced and I don't understand how to implement the methods in my code.

    QList - clear() method

    https://developer.BlackBerry.com/Cascades/reference/QList.html#clear

    Using the data access Code, example
                              
    data_access/using_data_source

    GroupDataModel - Clear()

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__groupdatamodel.html#clear

    CODE

    Here is my code - filling of the display of the list of C++ and display of data in a ListView.

    MyApp.cpp

    MyApp::MyApp(bb::cascades::Application *app)
    : QObject(app){
        // create scene document from main.qml asset
            // set parent to created document to ensure it exists for the whole application lifetime
            QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
                AbstractPane *root = qml->createRootObject();
                qml->setContextProperty("yoyo",this);
                //grab references
                list_view = root->findChild("listView");
    
                // set created root object as a scene
                app->setScene(root);
    
                mNetworkAccessManager = new QNetworkAccessManager(this);
                bool result = connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*)));
    
                 Q_ASSERT(result);
                 Q_UNUSED(result);                 json = new QFile("data/file.json");
    }
    
    void MyApp::init(){
        QNetworkRequest request = QNetworkRequest();
         // i call some service here
         mNetworkAccessManager->get(request);
    }
    
    void MyApp::requestFinished(QNetworkReply *reply){
        qDebug() << reply->error();
        qDebug() << reply->errorString();
        if (reply->error() == QNetworkReply::NoError) {
            qDebug() << "No error";
    
                    QByteArray data = reply->readAll();
    
                    if (!json->open(QIODevice::ReadWrite)) {
                        qDebug() << "Failed to open file";
                        return;
                    }
                    json->write(data);
    
            bb::data::JsonDataAccess jda;
            QVariantMap results = jda.loadFromBuffer(data).toMap();
                    QVariantList lst = jda.loadFromBuffer(data).toList();
                GroupDataModel *m = new GroupDataModel();
                       m->insertList(lst);
                       m->setGrouping(ItemGrouping::None);
                       if(list_view) list_view->setDataModel(m);
    
        }else{
            showDialog("Boo",reply->errorString());
        }
    }
    

    MyApp.hpp

    // Tabbed pane project template
    #ifndef MyApp_HPP_
    #define MyApp_HPP_
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    namespace bb {
    namespace cascades {
    class Application;
    }
    }
    namespace bb {
    namespace data {
    class Application;
    }
    }
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class MyApp: public QObject {
    Q_OBJECT
    public:
        MyApp(bb::cascades::Application *app);
        virtual ~MyApp() {
        }
        Q_INVOKABLE
        void init();
    private slots:
        void requestFinished(QNetworkReply *reply);
    private:
        QNetworkAccessManager *mNetworkAccessManager;
        QNetworkRequest *request;
        QFile *json;
        bb::cascades::ListView *list_view;
    };
    
    #endif /* MyApp_HPP_ */
    

    hand. QML

    import bb.cascades 1.0
    
    Page{
    Container {
                            background: Color.White
                            ListView {
                                id: listView
                                preferredHeight: maxHeight
                                objectName: "listView"
                                listItemComponents: [
                                    ListItemComponent {
                                        type: "item"
                                        Container {
                                            Container {
                                                Label {
                                                    text: ListItemData.id
                                                }
                                            }
    
                                        }
                                    }
                                ]
                                onTriggered: {
                                    console.log("selected_index: " + indexPath)
                                }
                                horizontalAlignment: HorizontalAlignment.Center
                                verticalAlignment: VerticalAlignment.Center
                            }
    
    }
    }
    

    Question 2:

    How reference to the ListView object with the name "listView" in different parts of the MyApp.cpp file? Is there anything else I should add to the header file to make the accessible listView?

    Question 3:

    What happens when you call the clear() method? How the data model is affected? How the user interface is affected? What happens in memory?

    Question 4:

    How do you verify that the data in the list has been deleted so that you can go ahead and fills again with new data? What is the cheque that I perform?

    I would also like to know how you manage multiple views of lists and data sources in your applications. Best practices or ideas?

    Thank you

    I was able to clear the listview with the following code, if anyone is interested.

    listView.dataModel = null
    

    The dataModel must be set to "null".

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

Maybe you are looking for