我有以下的ExtJS。当响应成功时(响应是JSON,如:{“success”:true,“message”:“......”}),调用监听器“write”。但是,如果回复不成功,我该如何附加回调? ({ “成功”:假的, “消息”: “......”})Ext.data.HttpProxy回调失败
tableStructure.proxy = new Ext.data.HttpProxy({
api: {
read: '/controller/tables/' + screenName + '/getstructure/' + table,
create: '/controller/tables/' + screenName + '/createcolumn/' + table,
update: '/controller/tables/' + screenName + '/updatecolumn/' + table,
destroy: '/controller/tables/' + screenName + '/destroycolumn/' + table
},
listeners: {
write: tableStructure.onWrite
}
});
我已经试过了(似乎是显而易见的)。但是,当成功时,回调不会被解雇 – 2011-03-30 19:26:25