Friday, 15 June 2012

extjs4 - How to attach event handler to ExtJs Component before it is created -


I know something about the DOM query but it will not help me to solve this problem. I have to attach several events to several text fields in App Launch Extras 4. How do i do this

If you want to assign the event handler to the components before the elements are created, you answer this You can use.

If you want to assign the event handler to the components before the components are created, then all you need is the method (this is used internally by MVC controllers):

  var listeners = {'textfield [cls = "mycls"]': {change: function (warnings ('Textfield CLS =' "Change Michael"); }}}; Ext.app.EventBus.control (listeners, scope object);   

Note that the Ext.app.EventBus cam is not present in Docs.

here <.

If you are using only the Extras MVC method, then you can find examples of using the control method.

No comments:

Post a Comment