PDA

View Full Version : Extending Store & baseParams



TigersWay
29 Jan 2010, 7:12 PM
Learning ExtJS, I'm trying to extend Ext.data.Store...
But it seems I'm doing something wrong as I can't naturally set the baseParams property, I need the red "hack" below!

Anybody can give me a hint?


Metta.QuickStore = Ext.extend(Ext.data.Store, {
autoLoad: true,

constructor: function(config) {
this.proxy = new Ext.data.HttpProxy({
url:'backEnd/'+config.controller,
method:'POST'
});
delete config.controller;
this.reader = new Ext.data.JsonReader(Ext.applyIf(config,
{root:'rows'}
));
Ext.apply(this, config);
Metta.QuickStore.superclass.constructor.call(this, arguments);
this.baseParams = config.baseParams || {};
//console.dir(this.baseParams);
}
});