parky128
24 Feb 2012, 5:49 AM
Hi,
I have some combo's which I need to call a common basic function if the select or change events fires for any of these. At the moment they are calling specific select and change functions like so:
Ext.define('PPExtranet.controller.Customer', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
"#cmbCustomerFilter": {
select: this.onCmbCustomerFilterSelect,
change: this.onCmbCustomerFilterChange
}
});
var me = this;
},
onCmbCustomerFilterSelect: function(field, value, options) {
console.log('cmbCustomerFilterSelect cstName now: '+value[0].data.Name);
},
onCmbCustomerFilterChange: function(field, newValue, oldValue, options) {
console.log('cmbCustomerFilterChange cstName now: '+newValue);
},
filterCustomersStore: function() {
}
});
But I now want them to call a common basic function (i need to do some custom filtering on a store), however if I try and change the function name in Designer on my select and change controller actions, Designer wont let me saying that the function name is already in use or reserved.
Does this mean in the current select and change handler functions above, I then need to make a call to my basic function?
I have some combo's which I need to call a common basic function if the select or change events fires for any of these. At the moment they are calling specific select and change functions like so:
Ext.define('PPExtranet.controller.Customer', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
"#cmbCustomerFilter": {
select: this.onCmbCustomerFilterSelect,
change: this.onCmbCustomerFilterChange
}
});
var me = this;
},
onCmbCustomerFilterSelect: function(field, value, options) {
console.log('cmbCustomerFilterSelect cstName now: '+value[0].data.Name);
},
onCmbCustomerFilterChange: function(field, newValue, oldValue, options) {
console.log('cmbCustomerFilterChange cstName now: '+newValue);
},
filterCustomersStore: function() {
}
});
But I now want them to call a common basic function (i need to do some custom filtering on a store), however if I try and change the function name in Designer on my select and change controller actions, Designer wont let me saying that the function name is already in use or reserved.
Does this mean in the current select and change handler functions above, I then need to make a call to my basic function?