Roo.data.HttpProxy = function(conn){
Roo.data.HttpProxy.superclass.constructor.call(this);
// is conn a conn config or a real conn?
- Roo.log('httpproxy:conn');
- Roo.log(conn);
- ')
this.conn = conn;
this.useAjax = !conn || !conn.events;
callback : this.loadResponse,
scope: this
};
- if (this.conn.timeout) {
- Roo.log('setting timeout to ' + this.conn.timeout);
- o.timeout = this.conn.timeout;
- }
if(this.useAjax){
- Roo.log("using ajax");
Roo.applyIf(o, this.conn);
if(this.activeRequest){
Roo.Ajax.abort(this.activeRequest);
}
this.activeRequest = Roo.Ajax.request(o);
}else{
- Roo.log("not using ajax");
this.conn.request(o);
}
}else{
result = o.reader.read(response);
}catch(e){
this.fireEvent("loadexception", this, o, response, e);
- o.request.callback.call(o.request.scope, null, o.request.arg, false);
+ o.request.callback.call(o.request.scope, {
+ success : false,
+ raw : {
+ errorMsg : response.responseText
+ }
+
+ }, o.request.arg, false);
return;
}