Feder Catalin
Feder Catalin

Reputation: 163

EXT JS 4 MVC click event on a div

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.

Upvotes: 0

Views: 467

Answers (0)

Related Questions