Hybrid View
-
17 Nov 2012 7:34 AM #1
Unanswered: Listener event to two or more functions
Unanswered: Listener event to two or more functions
Hi community,
I have a problem,
I need define inside of Controller, a event for listeners two functions and this not work.
The source is:
How to configure the property 'control'??Code:Ext.define('myProyect.controller.FormController', { extend: 'Ext.app.Controller', config: { refs: { fieldid : 'textfield[id=fieldid]' }, control: { fieldid : { change : ['ChangeValue', 'ChangeValue2'] } } }, ChangeValue : function(me, newValue, oldValue){ console.debug(me); }, ChangeValue2 : function(me, newValue, oldValue){ console.debug('2', me); } });
Thanks for all
-
17 Nov 2012 9:43 AM #2
Hi csantos,
can't you do this like this?
Best regards,Code:Ext.define('myProyect.controller.FormController', { extend: 'Ext.app.Controller', config: { refs: { fieldid : 'textfield[id=fieldid]' }, control: { fieldid : { change : 'handleFieldChange' } } }, handleFieldChange: function(textfield, newValue, oldValue) { this.ChangeValue(textfield, newValue, oldValue); this.ChangeValue2(textfield, newValue, oldValue); }, ChangeValue : function(me, newValue, oldValue){ console.debug(me); }, ChangeValue2 : function(me, newValue, oldValue){ console.debug('2', me); } });
Schildi
-
17 Nov 2012 11:54 AM #3
Thanks for your help Schildi,
With that solved my problem.


Reply With Quote