title: EXT.JS looping through a store and generating components inside an items array
body: <p>I'm trying to add a bunch of components to my container using data populated in my store. I want to iterate through my stores records and output a label/panel/etc to display the data.</p>
  
  <p>This is how I'm looping through now:</p>
  
  <pre><code>  initComponent: function () {
    //Create a container for each array, then in that container, 
    //create a label and wrapping panel, then add the items to the wrapping panel
    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);
  }
  </code></pre>
  
  <p>But of course, being the EXTJS noob that I am, this doesn't work. I would appreciate any advice and best practice tips you can provide to get this working.</p>
  
  <p>My model, ItemArray, contains Items. I need to loop through my store of ItemArrays and make containers, then loop through the Items in the ItemArray populate those containers with Items.</p>
  
  <p>Thanks everyone!</p>