-
5 Jan 2007 9:25 AM #1
Abort previous LoadableDataModel.loadPage calls
Abort previous LoadableDataModel.loadPage calls
When making multiple calls to loadPage (i.e. a user clicks twic) the previous call should be aborted before the next one is made to avoid a race condition where the second call returns before the first and when the first call returns it overwrites the second call's data.
-
5 Jan 2007 9:36 AM #2
Looks like it was one of those things that just didn't make it in as it only takes a few small changes to get it to work (copied the methods from another yui-ext object that already had them). I didn't capture it below but I also had to add "this.abort();" to the second line of the load method so it would abort the previous on every load.
Code:YAHOO.ext.grid.LoadableDataModel.prototype.isLoading = function(){ return this.transId ? true : false; }; YAHOO.ext.grid.LoadableDataModel.prototype.abort = function(){ if(this.isLoading()){ YAHOO.util.Connect.abort(this.transId); } };
-
5 Jan 2007 9:49 AM #3
Similar Threads
-
Previous Progress Dialog
By tony.summerville in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 6 Jun 2007, 8:35 AM -
setTimeout calls yui or yui-ext class member
By dlibby00 in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 7 Feb 2007, 8:27 AM -
Suggestion: LoadableDataModel load() to abort previous load?
By jarrod in forum Ext 1.x: BugsReplies: 1Last Post: 23 Nov 2006, 9:08 PM -
Grid Editor - Get Previous Value
By thejoker101 in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 9 Nov 2006, 7:13 AM -
Local YAHOO.ext.grid.LoadableDataModel.load()
By manxomfoe in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 18 Oct 2006, 4:19 PM


Reply With Quote