title: Creating Accordion layout items from datastore in extjs
body: <p>I have a Panel whose layout is accordin. I have a datastore which gets the data from server in json format and maps to a model. The data I get is a list of that model. Now in my view, I need to access the store and get all the records, and for each record I need to create a Panel and add it to the parent Panel. </p>
  
  <p>My Store</p>
  
  <pre><code>Ext.define('NOS.store.ResultGroupsStore', {
      extend: 'Ext.data.Store',
      requires : ['NOS.model.ResultGroup'], 
      model: 'NOS.model.ResultGroup',
      fields:['groupName'],
      alias: 'widget.resultStore',
  //  autoLoad: true,
      proxy: {
          type: 'ajax',
          url: 'showResult.nos',
          reader: {
              type: 'json'
          }
      }
  });
  </code></pre>
  
  <p>My View</p>
  
  <pre><code>Ext.require('Ext.panel.Panel');
  Ext.define('NOS.view.ResultView' ,{
      extend: 'Ext.panel.Panel',
      alias:'widget.results',
      title: 'My title',
      layout:'accordion',
      items:null,
      initComponent : function() {
          console.log("reached in view initialise");
          results = Ext.create('NOS.store.ResultGroupsStore');
          results.load();
          results.each(function(aResultGroup, index) {
              console.log('Record ' + index);
          });
          console.log("End in view initialise");
          this.callParent(arguments);
      },
  });</code></pre>
  
  <p>But it never enters the loop above. I am sure the data is loaded properly to the store because when I use a grid.Panel and map the columns it renders the data.</p>
  
  <p>Please help!!</p>