I'm very new to ExtJS and getting quite lost. I have created a data store -
var sections = Ext.create('Ext.data.Store', {
data: [
{"section" : "One"},
{"section" : "Two"},
{"section" : "Three"}
]
});
What I would like to do now is create a panel for each section, using the section name (one, two three) as the title.
I have tried a few ways, all of which are really unsuccessful. How do I go about solving this problem?
EDIT - Example of something I tried
var sectionStore = Ext.getStore(sections);
var allRecords = sectionStore || sectionStore.data("section");
allRecords.each(function(record) {
Ext.define('Ext.panel.Panel', {
xtype: 'panel',
title: record,
text: record
})
console.log(record)
});