title: ExtJS. Load a store on render
body: <p>Since this <a href="https://stackoverflow.com/questions/2235677/in-extjs-how-do-i-load-a-store-when-i-display-a-grid">thread</a> seems to be terribly outdated, let me ask a similar question. So, I have a <code>store</code> defined like so:</p>
  
  <pre><code>Ext.define('GeoServer.store.ObjectsStore', {
      extend: 'Ext.data.TreeStore',
      requires: ['GeoServer.model.ObjectsModel'],
      model: 'GeoServer.model.ObjectsModel',
      autoLoad: false,
      proxy: {
          type: 'ajax',
          url: 'controller/MapsHandler.php',
          extraParams: {
              action: 'listObjects'
          }
      }
  });
  </code></pre>
  
  <p>As you can see, it has <code>autoLoad</code> set to <code>false</code>. This is because I do not want to load dozens of stores on page load, I only want to load them, when I need it. For example, in this case I need to load this store, when I show a window with a <code>treepanel</code> inside. The way I show this window is:</p>
  
  <pre><code>Ext.create("Ext.window.Window",{ 
      title: "Objects",
      height: size.height,
      width: size.width,
      constrainHeader:true,
      layout:"fit",
      maximizable:true,
      items:[{
          xtype: 'treepanel',
          rootVisible: false,
          scrollable: true,
          itemId: 'Objects',
          store: 'ObjectsStore',
          border: false,
          autoLoad: true // has no effect
      }]
  }).show();
  </code></pre>
  
  <p>But the nasty thing is that when the window shows up for the first time, the tree does not get populated with data, even though I see that server request is triggered. However, when the windows shows up for the second, third, etc. time, everything is ok. So, what is so special with the first time and how to use this <code>autoLoad</code> property in the right way?</p>