View Full Version : PagingMemoryHttpProxy

28 Apr 2008, 7:46 AM
What is it?

This extension is exactly like PagingMemoryProxy found here: http://extjs.com/forum/showthread.php?t=11652, except it adds a few things:

Caching of data so the reader doesn't have to transform the data into records with each call (configurable).
Ability to grab the entire data set from the server, and be able to page it.
This is the main reason for this plugin. I had a very special case where paging using
the server alone was slow and not what I wanted. You can supply an url parameter to the
PagingMemoryHttpProxy, and on the first call to load it will grab the data from the server.
It will be paged based on the parameters you send in as normal. Any consecutive calls to
load will load it from the cache. You must call reset() in order for it to fetch the data
from the server again.




You can contact me via my profile on this forum, or my email address found on http://outroot.com. I would appreciate any comments, suggestions, or feature requests.

24 Jun 2008, 12:23 PM
Hi crenix, thanks for this great job!

I have a problem with the paging.
I'm displaying 22 items in my grid with 10 items per page. so I have 3 pages.
when I'm in the page #3, somo other people remove 2 items in other instance of the web application, then I refresh the store specting it display 20 items and move me to page 2, but it is not. a javascript error occurs and the grid stay loandig.... I think that the "reload" method try to load elements in page 3 when this doesn't exist any more...

I refresh store with this:


can you help me with this??

24 Jun 2008, 12:53 PM
Hi crenix, my problem is solved.
I add a couple of lines in your JS line 310 in the funtion load()

self.remoteProxy.load(o.remoteParams, reader, function(result, arg, success) {
if (success) {
if (result.totalRecords<= o.params.start)
o.params.start -= o.params.limit;
self.loadResult(o, success);
}, self, arg);

may be you can add this little change to your js repository

thanks for your extension