var store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url:'md3getMyRest.do',
method:'GET'
}),
reader : new Ext.data.JsonReader({
root:'root',
totalProperty: 'totalProperty',
},Ext.data.Record.create([
{name : 'alti',type :'string',mapping: 'A'},
{name : 'aty',type :'string',mapping: 'B'},
{name : 'att',type :'double',mapping: 'C'},
{name : 'aa',type :'string',mapping: 'D'},
])
)
});
把最后一个 {name : 'aa',type :'string',mapping: 'D'},后面的逗号去掉就可以了,很蛋疼的唉。
proxy : new Ext.data.HttpProxy({
url:'md3getMyRest.do',
method:'GET'
}),
reader : new Ext.data.JsonReader({
root:'root',
totalProperty: 'totalProperty',
},Ext.data.Record.create([
{name : 'alti',type :'string',mapping: 'A'},
{name : 'aty',type :'string',mapping: 'B'},
{name : 'att',type :'double',mapping: 'C'},
{name : 'aa',type :'string',mapping: 'D'},
])
)
});
把最后一个 {name : 'aa',type :'string',mapping: 'D'},后面的逗号去掉就可以了,很蛋疼的唉。
本文介绍了一个关于ExtJS框架中数据存储配置的具体实例,详细解释了如何设置Store以使用HTTP代理从特定URL获取数据,并解析JSON响应。同时,文中提到了如何定义数据字段及其类型映射,以及解决代码中出现的逗号错误。
196

被折叠的 条评论
为什么被折叠?



