rem: var _fetchHandler = function(requestObject, items){ 
add: var _fetchHandler = function(items, requestObject){ 
context: 	var _fetchHandler = function(requestObject, items){		var oldAbortFunction = requestObject.abort || null;		var aborted = false;		var startIndex = requestObject.start?requestObject.start:0;		var endIndex   = requestObject.count?(startIndex + requestObject.count):items.length;		requestObject.abort = function(){			aborted = true;			if(oldAbortFunction){				oldAbortFunction.call(requestObject);			}		};		var scope = requestObject.scope || dojo.global;		if(!requestObject.store){			requestObject.store = self;		}		if(requestObject.onBegin){			requestObject.onBegin.call(scope, items.length, requestObject);		}		if(requestObject.sort){			items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));		}		if(requestObject.onItem){			for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){				var item = items[i];				if(!aborted){					requestObject.onItem.call(scope, item, requestObject);				}			}		}		if(requestObject.onComplete && !aborted){			var subset = null;			if (!requestObject.onItem) {				subset = items.slice(startIndex, endIndex);			}			requestObject.onComplete.call(scope, subset, requestObject);   		}	};
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/df32523b2cd3ff086424d17e1cf985e502673314/simpleFetch.js/clean/data/util/simpleFetch.js