Extjs 禁用窗体面板

Extjs 禁用窗体面板,extjs,extjs4.1,Extjs,Extjs4.1,我有一个formpanel,我需要在满足条件时禁用它 if (conditionIsMet){ var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0]; } 但是我怎么才能禁用它呢 if (conditionIsMet){ var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0].disa

我有一个formpanel,我需要在满足条件时禁用它

if (conditionIsMet){

        var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0];


}
但是我怎么才能禁用它呢

if (conditionIsMet){
  var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0].disable();
}
为什么在这里使用ComponentQuery查询?你不能通过id获取formpanel吗<代码>Ext.getCmp('formPanelId').disable()

为什么在这里使用ComponentQuery查询?你不能通过id获取formpanel吗<代码>Ext.getCmp('formPanelId').disable()