View Full Version : Extending Ext.data.Store; baseParams problem

10 Sep 2009, 1:56 AM
Hi guys,
I'm building a set of preconfigured classes for my ExtJs application.

I'm extending Ext.data.Store class but I'm facing a problem in pre-setting the baseParams property:

This is the code of my preconfigured Store:

Ext.MyApp.DefaultStore = Ext.extend(Ext.data.Store, {
baseParams: {limit: 3},
remoteSort: true,
I noticed that baseParams was always reset to {}, so I had a look at his code and found that it's reset in the Ext.data.Store constructor (Ext 3.0.0 - src/data/Store.js - line 87)

Here is my dirty hack:

Ext.MyApp.DefaultStore = Ext.extend(Ext.data.Store, {

baseParams: {limit: 3},

constructor: function(config) {
baseParams = this.baseParams;
Ext.voipeople.DefaultStore.superclass.constructor.call(this, config);
this.baseParams = baseParams;

Am I doing something wrong or is it an expected behaviour?
Could it be considered a bug?

Tnx in advance


Edoardoi Serra