extjs4 - override initComponent() method -


i want override initcomponent( ) method of ext.grid.column.column class. how executes lines. want remove listeners element , wants assign other element.

ext.override(ext.grid.column.column,  {          initcomponent: function(){          .          .  //all lines till me.callparents();           .          .          .          .          .          .          .          // initialize headercontainer          me.callparent(arguments);          me.on({      <<<------------------------------do not need these.             element:  'el',             click:    me.onelclick,             dblclick: me.oneldblclick,             scope:    me         });         me.on({      <<<------------------------------do not need these.             element:    'titleel',             mouseenter: me.ontitlemouseover,             mouseleave: me.ontitlemouseout,             scope:      me         });      }  } 

i not want attach listeners "el" , "titleel" remove lines. how still add listeners. write me.un() in afterrender function. tho adds listener "el" , "titleel"

can please guide me wrong?????

instead of using ext.override, use ext.define create sub-class. when redefine initcomponent method, can use this.superclass.superclass.initcomponent.call skip on ext.grid.column.column#initcomponent.

ext.define('myapp.grid.column.column', {     extend: 'ext.grid.column.column',     alias:  'widget.mycolumn',      initcomponent: function(){         // pre-initcomponent column class here          // ext.grid.header.container#initcomponent         this.superclass.superclass.initcomponent.call(this);          // optional stuff here     } }); 

then when create new columns, use xtype: 'mycolumn' use own implementation while still being able use regular columns needed.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -