title: Extjs4, how to retrieve single textfield value?
body: <pre><code>var confirmWindow = Ext.create('Ext.window.Window', {
       title: 'Selected Item List',
       autoHeight: true,
       width: 500,
       layout: 'fit',
       modal: true,
       items: [{
          xtype: 'panel',
          bodyPadding : 5,
          items: [{
             xtype: 'textfield',
             id : 'freightFee',
             fieldLabel: 'Freight Fee ',
             name : 'freight' // I need this value, when I click the button
          }]
       }],
       bbar: ['-&gt;', {
           xtype: 'buttongroup',
           items: [{
             text: "test",
             handler: function () {
                // I want to get the textfield value (freightFee)
                var freightFee = Ext.getCmp('freightFee').getValue(); // error :Ext.getCmp('freightFee') is undefined
                  }
              }]
              }
          });
  </code></pre>
  
  <p>I have a window like above, and I want to get the text inputbox value when I click the button.</p>
  
  <p>I tried,</p>
  
  <pre><code>var freightFee = Ext.getCmp('freightFee').getValue();
  </code></pre>
  
  <p>but error message say,</p>
  
  <blockquote>
    <p>Ext.getCmp('freightFee') is undefined</p>
  </blockquote>
  
  <p>anybody know this? </p>
  
  <p>thank you!</p>