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'
      }]
}]