title: ExtJS: How to make component maximizable inside its parent container?
body: <p>Basically what I want is, to use some component which can maximize to occupy its parent Component. 
  Hence I am using <code>Ext.window.Window</code>(Window) component inside <code>Ext.panel.Panel</code> (Panel), which I can replicate somehow in multiple row of window. window must be rendered with <code>Ext.view.View</code>(DataView) using <code>Xtemplate</code>.<br>
  Window has property named as <code>tpl</code>, but I think, Window <strong>does not</strong> have <strong>store</strong> attributes like other components, but it has <strong>data</strong> attribute.<br>
  <strong>Here is</strong> <a href="https://fiddle.sencha.com/#fiddle/851" rel="nofollow">fiddle</a>.<br>
  <strong>So how to load data using a Store inside Xtemplate for window ?</strong></p>
  
  <p><strong>Another question:</strong> when I am trying to initiate component using <code>initComponent()</code> inside window object, it always throws error in console (chrome):  </p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'insert' of undefined   
  </code></pre>
  
  <p><strong>Panel</strong></p>
  
  <pre><code>Ext.create('Ext.panel.Panel', {
      id: 'panel-id',
      itemId: 'panel-id',
      height: 600,
      width: 600,
      resizable: true,
      border: true,
      layout: 'vbox',
      renderTo: Ext.getBody()
  });  
  </code></pre>
  
  <p><strong>Template</strong>  </p>
  
  <pre><code>var tpl= new Ext.XTemplate(
    '&lt;div&gt;My name is &lt;b&gt;{name}&lt;/b&gt;&lt;/div&gt;'
  );
  </code></pre>
  
  <p><strong>Window</strong>  </p>
  
  <pre><code>Ext.create("Ext.window.Window", {
          width: 600,
          maximizable: true,
          constrain: true,
          resizable: false,
          constrainHeader: true,
          constrainTo: 'panel-id',
          renderTo: 'panel-id',
          autoShow: true,
          initComponent: function()
          {
              this.tpl= tpl;
              this.data= {"name":"agpt"};
              this.callParent(arguments);
          }
      });
  </code></pre>
  
  <p>So, I am exactly not getting why <strong>window</strong> is not getting render inside <strong>panel</strong> if I am mentioning <code>initComponent()</code> inside window. Thanks</p>