function EucitaClient()...{ this._conn= new Ext.data.Connection(); this.blocked=false; this.queue=new Array(); var single=this; this.setCon=function(con) ...{ if (con) this._conn=con; } this.commit=function(req) ...{ if(single.blocked) ...{ single.queue.push(req); } this.blocked=true; var reqWrapper=new Object(); reqWrapper.callback=function(oElement, bSuccess, oResponse) ...{ req.callback(oElement, bSuccess, oResponse); single.blocked=false; req=single.queue.pop(); if(req) single.commit(req); } reqWrapper.url=req.url; reqWrapper.params=req.params; this._conn.request(reqWrapper); }}_conn=new EucitaClient();