【发布时间】:2013-08-05 19:01:11
【问题描述】:
我有一个网格面板,我想获取我嵌入存储中的数据
我的 json 看起来像(embed 是我的嵌入数据)
({"total":"20","results":[{...}], "embed": [{...}] })
如何在我的load 函数中获取embed 数据。谢谢
var store = Ext.create('Ext.data.Store', {
model: 'MyDataObject',
autoLoad: true,
pageSize:10,
proxy: {
type: 'ajax',
url: 'data.php',
reader: {
type: 'json',
totalProperty: 'total', // total data
root: 'results'
}
}
,listeners: {
load: function( store, records, successful, eOpts ){
if (successful) {
alert(store.embed) // ?? how to get it
}
}
}
});
【问题讨论】:
-
"store.data.embed" 会给你一个嵌入数据的对象
-
@Daemon 在未定义的情况下不起作用?