我有以下的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