PDA

View Full Version : Passing extra parameters to controller listener



hermann.s
5 Nov 2013, 4:28 AM
I have the following controller :


Ext.define('MCS.controller.switchUser.grid', {
extend: 'Ext.app.Controller',
stores: ['switchUser.switchUserStore'],
views: ['switchUser.grid'],


init: function () {
this.control({
'gridpanel#switchUserGrid':
{
itemdblclick: this.selectUser
}
});
},


selectUser: function () {
}
});


Is it possible to add extra parameters to itemdblclick?

filippo.ferrari
5 Nov 2013, 12:10 PM
Where I want to do something similar.. I use Ext.bind, look API for details.

ettavolt
6 Nov 2013, 3:28 AM
For the listener you can specify ordinary .addListener config object instead of passing only function reference.