这是我的代码:
function getStore (json) {
var reader = new Ext.data.JsonReader({
root : 'data',
successProperty: 'success',
totalProperty: "rows",
fields : [
{name: 'num', allowBlank:'true'},
{name: 'date', dateFormat:'d.m.Y H:i:s', type: 'date'},
{name: 'signerFIO', type: 'string'},
{name: 'checkSign', type: 'boolean'}
]
});
var store = new Ext.data.JsonStore ({
data : json,
reader : reader
});
return store;
}
来自服务器的数据是:{"data":[{"num":"111","signerFIO":"hello","checkSign":true,"date":"25.05.2012"}],"success":1,"rows":1}
我尝试将“json”函数参数设置为原始 json(到达时)和 Ext.util.JSON.decode(response.responseText)
我已经在 FF 和 FireBug 中尝试过这段代码,但我遇到了奇怪的h is undefined
错误。
有人知道出了什么问题吗?
更新
这
var store = new Ext.data.JsonStore ({
data : json,
fields : ['data']
});
在没有错误的情况下为我工作,但也没有加载数据。