- In Extjs , Our own custom events can be added to the component.
- Custom events will be fired explicitly, when required.
- The execution of custom events will be done by fireevent().
- Following code illustrates the situation
var button = Ext.create('Ext.Button', {
renderTo: Ext.getBody(),
text: "Fire custom event",
listeners: {
customEvent: function(button) {
Ext.Msg.alert('Custom event called');
}
}
});
button.fireEvent('customEvent', button);
No comments:
Post a Comment