HI All,
I am using ExtJs 4.1. I have a view which contains a button and a tab panel. The tab panel have two tabs. On click of button, I load the data into one of the tab. While data is loading into the tab, I am showing mask over the tab using tab.setLoading().
Code:
Ext.define('MyProject.DefaultController',
{
id: 'DefaultController',
extend: 'Ext.app.Controller',
init: function () {
this.control({
'defaultview #btn-getData': {
click: this.onBtnData
}
});
},
onBtnData: function () {
var tab = Ext.getCmp("my-tab");
tab.getEl().mask('<input type="button" value="Cancel" />');
tab.setLoading('');
}
});
I am showing a bttuon in the mask using tab.getEl().mask('<input type="button" value="Cancel" />');
I want to add a event handler function for the cancel button in the mask. So when user clicks on the cancel button, system should call the required function.