I am trying to add a bunch of components to my container using the data populated in my store. I want to iterate over records in stores and display the label / panel / etc to display the data.
This is how I loop now:
initComponent: function () {
this.store = Ext.create('Ext.data.Store', {
model: 'MyProject.model.ItemArray',
data: []
});
Ext.apply(this, {
items: [
this.store.each(function() {
{
xtype:'label', text:
'test'
}
})
]
});
this.callParent(arguments);
}
But of course, being an EXTJS noob that I, this does not work. I would appreciate the advice and best practice advice you can provide in order to get this job.
My ItemArray model contains items. I need to go through my ItemArrays store and make containers, and then scroll through the items in ItemArray, fill these containers with Items.
Thanks everyone!
source
share