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: ['->', {
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
}
}]
}
});
上記のようなウィンドウがあり、ボタンをクリックしたときにテキスト入力ボックスの値を取得したいと考えています。
私は試した、
var freightFee = Ext.getCmp('freightFee').getValue();
しかし、エラーメッセージは言う、
Ext.getCmp('freightFee') は定義されていません
誰もこれを知っていますか?
ありがとう!