Thursday, July 2, 2015

How to handle event for a extjs component?


a. using listeners config object.
For ex for grid events : listeners: {rowclick: gridRowClickHandler,rowdblclick: gridRowDoubleClickHandler}
b. using addListener( String eventName, Function handler, [Object scope], [Object options] ) : void
Appends an event handler to this component
c. using on( String eventName, Function handler, [Object scope], [Object options] ) : void
Appends an event handler to this element (shorthand for addListener)
For ex: store.on( "datachanged", function( store ){ ..... });

No comments:

Post a Comment

What is restrict option in directive?

The restrict option in angular directive, is used to specify how a directive will be invoked in your angular app i.e. as an attribute, class...