I use Extjs 4.2 and Deftjs.
In my gridpanel view I define a plugin like:
plugins: [
Ext.create( 'Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners: {}
} )
]
But I do not want to define the listeners and actions in my view, rather in my controller.
So how do I define the listeners for this plugin from my controller?
I tried to define the whole plugin attribute in my controller's constructor:
constructor: function( oConfig ) {
var that = this;
Ext.apply( that, oConfig, {
plugins: [
Ext.create( 'Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners: {
edit: function( oEditor, oOptions ) {
console.log( oEditor, oOptions );
}
}
} )
]
} );
that.callParent( [ arguments ] );
},
But thats wrong, I can get the view config that way. I would like the plugin to stay in the view, but define the listeners in my controller.