【发布时间】:2011-10-17 15:28:01
【问题描述】:
这是我的网格 JsonStore。
var itemListStore = new Ext.data.JsonStore({
id : 'itemListStore',
proxy : new Ext.data.HttpProxy({
url : 'test.php',
}),
totalCnt : 'totalCnt', // ?
lastUpdate : 'lastUpdate', // ?
root : 'content', // it works ok
fields : [
{name : 'name', type : 'string'},
{name : 'id', type : 'string'},
],
autoLoad: true,
listeners : {
load : function(){
// I need to get the totalCnt and lastUpdate field value
alert(this.lastUpdate); // output : lastUpdate -,.-
}
}
});
代理数据是这样的
{"totalCnt":95,"lastUpdate":"2011-08-01 09:20:03.000","content":[{"name":"MURRAY MP220GF....... ........
我可以使用 content(root) 绘制网格,但我无法在加载函数中获取 totalCnt 和 lastUpdate 字段。
有人知道吗,请帮帮我
谢谢。
【问题讨论】: