title: Ext.getCmp undefined
body: <p>Though i checked other posts about the same question, they didn't prove to be much helpful.
  Below is the code where i am trying to get value of text box but i am repeatedly getting same error.
  Is there any alternative method available.</p>
  
  <pre><code>initComponent: function() {
      this.items = [
          {
              xtype: 'form',
              padding: '5 5 0 5',
              border: false,
              style: 'background-color: #fff;',
  
              fieldDefaults: {
                  anchor: '100%',
                  labelAlign: 'left',
                  allowBlank: false,
                  combineErrors: true,
                  msgTarget: 'side'
              },
  
              items: [
                  {
                      xtype: 'textfield',
                      name : 'id',
                      fieldLabel: 'id',
                      hidden:true
                  },    
                  {
                      xtype: 'textfield',
                      name : 'name',
                      id : 'idname',
                      fieldLabel: 'Name',
                      allowBlank:false,
                      blankText:'Name is required'
                  },
                  {
                      xtype: 'textfield',
                      name : 'accno',
                      maxLength: 16,
                      enforceMaxLength : true,
                      regex: /^.{16}$/,
                      regexText:'Only 16 Digits please',
                      //autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'},
                      fieldLabel: 'AccNo'
                  },
                  {
                      xtype: 'textfield',
                      name : 'trade',
                      fieldLabel: 'Trade'
                  },
                  {
                      xtype: 'datefield',
                      name : 'doi',
                      fieldLabel: 'Date Of Insurance',
                      editable: false,
                      value : new Date()
                  },
                  {
                      xtype: 'datefield',
                      name : 'dd',
                      fieldLabel: 'Due Date',
                      editable:false,
                      value : new Date()
                  }
              ]
          }
      ];
  
      this.dockedItems = [{
          xtype: 'toolbar',
          dock: 'bottom',
          id:'buttons',
          ui: 'footer',
          items: ['-&gt;', {
              iconCls: 'icon-save',
              itemId: 'save',
              text: 'Save',
              handler: function (button) {
                  Ext.Msg.alert('You clicked the button');
                  var txt = Ext.getCmp('idname').value();
                  //var tf = button.up('window').down('#idname');
  
                  Ext.Msg.alert(txt);
  
              }, 
              action: 'save'
          },{
              iconCls: 'icon-reset',
              text: 'Cancel',
              scope: this,
              handler: this.close
          }]
      }];
  
      this.callParent(arguments);
  }
  </code></pre>
  
  <p>});</p>