Tuesday, June 30, 2015

ExtJS - Custom Events

  1. In Extjs , Our own custom events can be added to the component.
  2. Custom events will be fired explicitly, when required.
  3. The execution of custom events will be done by fireevent().
  4. 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:

Serverless vs. Kubernetes: A Beginner's Guide

Serverless vs. Kubernetes: A Beginner's Guide Trying to decide between serverless and Kubernetes? Here's a simple breakdown: 🔹 Choo...