PDA

View Full Version : Ext.Ajax.request?failure: handleFailure?????



vivaExt
7 Apr 2010, 2:27 AM
ext 2.3.0????????

ajax????????
failure: handleFailure???????????????
??????????????????????

???http????????404?????
??handleFailure???????????????????
?????????????????????

yuki
9 Apr 2010, 11:47 AM
Firebug?????????????????????????????
????????????????

vivaExt
10 Apr 2010, 1:35 AM
ext-base.js?????????

{
if(o.conn.status!==undefined&&o.conn.status!=0){
httpStatus=o.conn.status;
}
else{
httpStatus=13030;
}
}
catch(e){
httpStatus=13030;
}
if((httpStatus>=200&&httpStatus<300)||(Ext.isIE&&httpStatus==1223)){
responseObject=this.createResponseObject(o,callback.argument);
if(callback.success){
if(!callback.scope){
callback.success(responseObject);
}
else{
callback.success.apply(callback.scope,[responseObject]);
}
}
}
else{
switch(httpStatus){
case 12002:
case 12029:
case 12030:
case 12031:
case 12152:
case 13030:
responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));
if(callback.failure){
if(!callback.scope){
callback.failure(responseObject);
}
else{
callback.failure.apply(callback.scope,[responseObject]);
}
}
break;default:responseObject=this.createResponseObject(o,callback.argument);
if(callback.failure){
if(!callback.scope){
callback.failure(responseObject);
}
else{
callback.failure.apply(callback.scope,[responseObject]);
}
}
}
}

???????200????success???????????????
status????200?????failure????????????
????????????
????????ext??????????????????