Extjs4 MVC mode to the function parameters of the problem

disableFlied: function(cmpName){

var a = Ext.getCmp(cmpName);
a.setDisabled(!a.isDisabled());

}
Hope to pass parameters to the method of cmpName
init: function() {

this.control({
'#speedCheck': {
change :this.disableFlied("aaa")
}
})
Panel a text field ID AAA, this is wrong, this parameter should be how to disableFlied.?

Started by Murray at December 18, 2016 - 10:48 PM


init: function() {

this.control({
'#speedCheck': {
change : 'onSpeedChange'
}
});
onSpeedChange : function(){
this.disableField('aaa');
}

Posted by Lisa at December 19, 2016 - 11:07 PM