這裏是下面的表格,我想訪問form`s表單內應用按鈕,而無需使用Ext.getCmp(),並定義一個ID爲按鈕:如何在extjs4中不使用Ext.getCmp()來啓用/禁用窗體按鈕?
{xtype : 'form',
url : 'index.php/submitform',
trackResetOnLoad : true,
id : 'generalprofilebasicinformation'+ this.getId(),
listeners : {
//is fired when the form is dirty(field values are modified)
dirtychange : {
fn : function(sm) {
//Here Is my problem:
//How to access to Apply button or any other buttons defined inside the form???
var applyButton = this.Button;
applyButton.enable();}}},
buttons : [{
text : 'Apply',
formBind : true, // only
// enabled
// once the
// form is
// valid
disabled : true,} ]}
像我知道,當你按下按鈕,該按鈕就會被觸發,這是不是我的case.Thanks反正 – 2012-02-06 19:09:56