ExtJS - On function

  • ON is the function used to create a listeners for the component.
  • The usage of ON is , allows you to create the listeners later.
  • We can add the listeners for already instantiated components.

var button = Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Button'

button.on('click', function() {
    Ext.Msg.alert('Event listener called from [on]');

No comments

Powered by Blogger.