在用extjs写web项目的时候,会遇到missing } in XML expression的问题,解决方法是在出错的js文件里加入以下代码就可以了:
Ext.override(Ext.form.Action.Submit,{
// private
processResponse : function(response){
this.response = response;
//增加下面几句代码就OK啦
var data = response.responseText;
if(data.indexOf('<pre>') != -1) {
response.responseText = data.substring(5, data.length-6);
this.response = Ext.util.JSON.decode(response.responseText);
}
///
if(!response.responseText){
return true;
}
this.result = this.handleResponse(response);
return this.result;
}
});