1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    3
    Answers
    1
    Vote Rating
    0
    fabergé is on a distinguished road

      0  

    Default Unanswered: ExtJs dynamically load store in menu

    Unanswered: ExtJs dynamically load store in menu


    Hi,

    I'm trying to do the following,
    I've got a store with 'favorite' records and i like them to display in a menu structure dynamically. I get the following error if i run it with the following code: Unable to get value of the property 'add': object is null or undefined. Is there any other way to do this?

    Store load:
    Code:
    var lFilterStore = Ext.create('WorkB.store.general.filter.Filters');
    lFilterStore.load({
          callback: function (records) {
             var lPersonsFavMenu = me.down('menuitem[name=favoritePersonMenu]');
             Ext.each(records, function (record) {
                      lPersonsFavMenu.item.add({ text: record.get('Name') });
             });
          }
    });

    Menu structure:
    Code:
    xtype: 'menu',
    showSeparator: false,
    floating: false,
    border: 0,
    margin: '0 0 5 0',
    items: [{
           text: 'Favorieten',
           menu: [{
                text: 'Person',
                name: 'favoritePersonMenu'
           }, {
                text: 'Customer',
                name: 'favoriteCustomerMenu'
          }]
    }]

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    change this:

    Code:
    lPersonsFavMenu.item.add({ text: record.get('Name') });
    to this:

    Code:
    lPersonsFavMenu.add({ text: record.get('Name') });

Thread Participants: 1

Tags for this Thread

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