【发布时间】:2012-05-28 04:12:59
【问题描述】:
我有一个 jsonstore:
jstore = new Ext.data.JsonStore({
fields: ['id', 'timer', 'name', 'message'],
root: 'data',
autoLoad: true,
proxy: new Ext.data.HttpProxy({
url: 'chat.php',
method: 'GET',
}),
remoteSort: false
});
它没有从 url 加载数据。 我的 php 文件可以正常工作,如果我输入的 url 与商店使用的 url 相同,输出是这样的:
{fields: ['id', 'name', 'time', 'message'], 'data': [{id: '5', name: 'stefano', time: '2012-05-21 14:08:58', message: 'mymessage'}]}
这应该是一个正确的 json 字符串,不是吗?
商店既没有通过自动加载也没有通过显式调用来加载
jstore.load({params: {mode:'RetrieveNew', id:'-1'}});
有什么可能导致这种情况的想法吗?非常感谢!
【问题讨论】: