1. #1
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default Dynamically add an item to a list

    Dynamically add an item to a list


    This works:
    Code:
    Ext.setup({onReady: function () {
    var e = new Ext.Panel({ fullscreen: true, items: [{ html: 'a' }, { html: 'b'}] });
    e.add({ html: 'c' });
    e.doLayout();
    }});
    
    Change it to an Ext.List and it blows up in the DataView's refresh method on the following line because 'this.store' is undefined:
    if (this.store.getRange().length < 1 && (!this.deferEmptyText || this.hasSkippedEmptyText)) {
    el.update(this.emptyText);
    }

    What's the appropriate way to dynamically add items to a list?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    List is not something that you can add components to. A list is always backed by a store. You can check the source code for our list example to see how to use it.

    Once you have your list with store setup you can easily add items by just adding a new record to the store.

Similar Threads

  1. Add tab item dynamically
    By wwwjsx in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 24 Oct 2009, 1:18 AM
  2. add item not in combobox list
    By iceblast_01 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Dec 2008, 8:21 PM
  3. how to add componets dynamically to items list of Accordian
    By rao in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 29 Aug 2008, 9:36 PM
  4. Add toolbar item dynamically?
    By TopKatz in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 3 Apr 2007, 12:04 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi