-
29 Mar 2011 12:29 PM #241
I ran into the same problem as msmolyak above. My page has 2 grids. One uses JsonStore, and one uses this PagingArrayStore. The PagingStore.js seems to 'replace' the Ext.data.*Store code just like you mention here.
I saw how the constructor for the 4 extension were assigned to their Ext.data.*Store counterparts. I felt this could be a cause. I replaced these constructor assignments with functions that call the respective Ext.data.*Store constructors. This seems to work. This could be because a new object is returned with the constructor function this way.
Here is the fix. It may be incomplete in some respects, but it seems to fix the current issue:
Code:Ext.ux.data.PagingDirectStore = Ext.extend(Ext.ux.data.PagingStore, { constructor: function(){ Ext.data.DirectStore.prototype.constructor.call(this); } }); Ext.reg('pagingdirectstore', Ext.ux.data.PagingDirectStore); Ext.ux.data.PagingJsonStore = Ext.extend(Ext.ux.data.PagingStore, { constructor: function(){ Ext.data.JsonStore.prototype.constructor.call(this); } }); Ext.reg('pagingjsonstore', Ext.ux.data.PagingJsonStore); Ext.ux.data.PagingXmlStore = Ext.extend(Ext.ux.data.PagingStore, { constructor: function(){ Ext.data.XmlStore.prototype.constructor.call(this); } }); Ext.reg('pagingxmlstore', Ext.ux.data.PagingXmlStore); Ext.ux.data.PagingArrayStore = Ext.extend(Ext.ux.data.PagingStore, { constructor: function(){ Ext.data.ArrayStore.prototype.constructor.call(this); }, loadData: function (data, append) { if (this.expandData === true) { var r = []; for (var i = 0, len = data.length; i < len; i++) { r[r.length] = [data[i]]; } data = r; } Ext.ux.data.PagingArrayStore.superclass.loadData.call(this, data, append); } }); Ext.reg('pagingarraystore', Ext.ux.data.PagingArrayStore);
-
4 Apr 2011 5:39 AM #242
I ran into the same thing. I'm not sure if it is correct or not to call the prototype's constructor method. I think with the constructor, you can just call:
Ext.ux.data.PagingDirectStore = Ext.extend(Ext.ux.data.PagingStore, {
constructor: function(){
Ext.data.DirectStore.call(this);
}
});
Ext.reg('pagingdirectstore', Ext.ux.data.PagingDirectStore);
Ext.ux.data.PagingJsonStore = Ext.extend(Ext.ux.data.PagingStore, {
constructor: function(){
Ext.data.JsonStore.call(this);
}
});
Ext.reg('pagingjsonstore', Ext.ux.data.PagingJsonStore);
Ext.ux.data.PagingXmlStore = Ext.extend(Ext.ux.data.PagingStore, {
constructor: function(){
Ext.data.XmlStore.call(this);
}
});
Ext.reg('pagingxmlstore', Ext.ux.data.PagingXmlStore);
Ext.ux.data.PagingArrayStore = Ext.extend(Ext.ux.data.PagingStore, {
constructor: function(){
Ext.data.ArrayStore.call(this);
},
loadData: function (data, append) {
if (this.expandData === true) {
var r = [];
for (var i = 0, len = data.length; i < len; i++) {
r[r.length] = [data[i]];
}
data = r;
}
Ext.ux.data.PagingArrayStore.superclass.loadData.call(this, data, append);
}
});
Ext.reg('pagingarraystore', Ext.ux.data.PagingArrayStore);
This seems to work and seems simpler. However, both may work fine (I would be interested to hear if anyone has any insight into which one is "correct").
-
12 Apr 2011 12:39 PM #243
Hey!
Thanks for this plugin, we seem to be missing only one last part. We're using the PagingJsonStore with a set of filters controlled by the store's filterBy function. Changing the filters successfully retrieves filtered results but only for the first page of results. When we move to a different page through the paging toolbar, our filters are lost and its displays whatever the unfiltered second page of results would have been.
Any help would be greatly appreciated.
Thanks again!
-
22 Apr 2011 1:43 PM #244
The workaround post above also does not work because the config is not passed in the constructor call, so I remedied that with:
Code:Ext.ux.data.PagingJsonStore = Ext.extend(Ext.ux.data.PagingStore, { constructor: function(config){ Ext.data.JsonStore.prototype.constructor.call(this,config); } });
-
27 Apr 2011 1:11 AM #245
Problem with Ext.PagingToolbar
Problem with Ext.PagingToolbar
FYI, I think there is a conflict between Ext.ux.PagingToolbar and Ext.PagingToolbar code. Even if I don't use any ux classes but include the PagingStore source in my html file, my Ext.PagingToolbar code does not working anymore.
As soon as I removed the include, everything works fine.
PagingStore v0.5 and ExtJS 3.2.1
Thanks
Joe
-
29 Jun 2011 4:49 AM #246
Can I use this with Ext 4 because i have a problem with paging local data.
-
11 Jul 2011 6:34 AM #247
There seems to be a problem when using Ext.ux.data.PagingStore with a Ext.ux.PagingToolbar when you never call the load function directly. I have a page where I only call the store's add method to add records. Initially when the page loads there are no records in the store, they are only added when the user presses a button.
In this case the current page number and the displayInfo are incorrect.
This is what I did to fix this problem:
Add a constructor for Ext.ux.data.PagingStore:
At the beginning of the Ext.ux.PagingToolbar's onChange method:Code:constructor: function(config) { this.totalLength = 0; Ext.ux.data.PagingStore.superclass.constructor.call(this, config); },
Change:
To:Code:if (this.cursor >= t) { this.cursor = Math.ceil((t + 1) / s) * s; }
Code:if (this.cursor >= t && this.cursor > 0) { this.cursor = Math.ceil((t + 1) / s) * s; }
-
20 Jul 2011 6:36 AM #248
PagingStore is a pretty useful extension. Will it be available in version4? I saw other people have same question.
-
24 Oct 2011 4:06 AM #249
Hi, I am using 'Ext.ux.data.PagingStore' component and trying to migrate from Ext3.2.1 to Ext 4 during migration i am getting an error 'records[i].join is not a function'. Some can provide any solution for the same please??
Thanks,
AtAS
-
3 Nov 2011 6:26 PM #250
Version for Extjs4.x???
Version for Extjs4.x???
Does anyone know if there is a port of Ext.ux.data.PagingStore for Extjs 4x?


Reply With Quote