我有一个商店,我想sync()与服务器.
Store.sync()方法具有success和failure属性的功能,它们具有Ext.data.Batch和options作为参数.
如果我从服务器得到这样的响应:
{
success: false,
msg: "test error!"
}
Run Code Online (Sandbox Code Playgroud)
failure 方法调用.
如何msg从failure方法中访问响应属性?
store.sync({
failure: function(batch, options) {
alert(batch.proxy.getReader().jsonData.msg);
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4700 次 |
| 最近记录: |