  fetchHandler(self._items, request); }); 
 var identifier = data.identifier; this._itemsByIdentity = {}; if(identifier){ this._identifier = identifier; for(i = 0; i < this._items.length; ++i){ var item = this._items[i].i; var identity = item[identifier]; if(!this._itemsByIdentity[identity]){ this._itemsByIdentity[identity] = item; }else{ throw new Error("dojo.data.QueryReadStore:  The json data as specified by: [" + this._url + "] is malformed.  Items within the list have identifier: [" + identifier + "].  Value collided: [" + identity + "]"); } } }else{ this._identifier = Number; for(i = 0; i < this._items.length; ++i){ this._items[i].n = i; } }    fetchHandler(this._items, request); })); 
	_fetchItems: function(request, fetchHandler, errorHandler){		//	summary:		// 		The request contains the data as defined in the Read-API.		// 		Additionally there is following keyword "serverQuery".		//		//	The *serverQuery* parameter, optional.		//		This parameter contains the data that will be sent to the server.		//		If this parameter is not given the parameter "query"'s		//		data are sent to the server. This is done for some reasons:		//		- to specify explicitly which data are sent to the server, they		//		  might also be a mix of what is contained in "query", "queryOptions"		//		  and the paging parameters "start" and "count" or may be even		//		  completely different things.		//		- don't modify the request.query data, so the interface using this		//		  store can rely on unmodified data, as the combobox dijit currently		//		  does it, it compares if the query has changed		//		- request.query is required by the Read-API		//		// 		I.e. the following examples might be sent via GET:		//		  fetch({query:{name:"abc"}, queryOptions:{ignoreCase:true}})		//		  the URL will become:   /url.php?name=abc		//		//		  fetch({serverQuery:{q:"abc", c:true}, query:{name:"abc"}, queryOptions:{ignoreCase:true}})		//		  the URL will become:   /url.php?q=abc&c=true		//		  // The serverQuery-parameter has overruled the query-parameter		//		  // but the query parameter stays untouched, but is not sent to the server!		//		  // The serverQuery contains more data than the query, so they might differ!		//		var serverQuery = typeof request["serverQuery"]=="undefined" ? request.query : request.serverQuery;		// Compare the last query and the current query by simply json-encoding them,		// so we dont have to do any deep object compare ... is there some dojo.areObjectsEqual()???		if(this.doClientPaging && this._lastServerQuery!==null &&			dojo.toJson(serverQuery)==dojo.toJson(this._lastServerQuery)			){			fetchHandler(this._items, request);		}else{			var xhrFunc = this.requestMethod.toLowerCase()=="post" ? dojo.xhrPost : dojo.xhrGet;			var xhrHandler = xhrFunc({url:this.url, handleAs:"json-comment-optional", content:serverQuery});			var self = this;			xhrHandler.addCallback(function(data){				self._items = [];				// Store a ref to "this" in each item, so we can simply check if an item				// really origins form here (idea is from ItemFileReadStore, I just don't know				// how efficient the real storage use, garbage collection effort, etc. is).				for(var i in data.items){					self._items.push({i:data.items[i], r:self});				}	// TODO actually we should do the same as dojo.data.ItemFileReadStore._getItemsFromLoadedData() to sanitize	// (does it really sanititze them) and store the data optimal. should we? for security reasons???				fetchHandler(self._items, request);			});			xhrHandler.addErrback(function(error){				errorHandler(error, request);			});			this.lastRequestTimestamp = new Date().getTime();			this._lastServerQuery = serverQuery;		}	},
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/23693cd0ff180e6a40e4072b0468a7e81e16dd37/QueryReadStore.js/buggy/data/QueryReadStore.js