0

I was wondering if it's possible to catch a click event on a certain div from the controller in an EXT JS 4 MVC app.

Lets say we have:

Ext.define('MyApp.controller.myController', {
extend : 'Ext.app.Controller',
init : function() {
    this.control({
        '#myDiv' : {
                     event: this.myFunction
                     }
    });
}
 myFunction: function() {...} });

When I click on myDiv I want to call myFunction.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 1
    Possible duplicate of http://stackoverflow.com/questions/6047862/attach-extjs-mvc-controllers-to-dom-elements-not-components/7535128 – mistaecko Aug 31 '12 at 16:54
  • Possible duplicate of [Attach ExtJS MVC controllers to DOM elements, not components](https://stackoverflow.com/questions/6047862/attach-extjs-mvc-controllers-to-dom-elements-not-components) – Brian Tompsett - 汤莱恩 Nov 01 '19 at 20:30

0 Answers0