getEventListener(eventName )

Returns an event handler.

Parameters:

  • eventName (String): name of event handler;


Example:

Create Show Details button, if the event handler for it is specified

var listener = this.getEventListener('onShowDetails');
if (listener != null) {
var button = document.createElement('button');
button.appendChild(document.createTextNode('Show Details'));
this.parentElement.appendChild(button);
// register the event handler with the button using Ext event manager
Ext.EventManager.addListener(button, "click", listener);
}