【发布时间】:2018-12-19 03:54:23
【问题描述】:
存储回调如下:
var store = new Ext.create("Ext.data.TreeStore", {
model: "DeptModel",
proxy: {
type: 'ajax',
url: 'jsonWebCommMenuOp_getMenus?PID=0',
reader: 'json'
},
autoload: true
});
store.load({
callback: function(records, options, success) {
var jsonStr = Ext.JSON.encode(records[0].raw);
var jsonObj = Ext.JSON.decode(jsonStr);
alert(jsonStr);
}
});
服务器响应如下:
{
"success": true,
"msg": "123"
}
我测试回调参数success,它等于true,但records是空白[]。
这是什么原因?请帮帮我。
【问题讨论】:
-
你的
DeptModel在哪里?
标签: extjs callback extjs4 store