我已将我的商店配置为:听到 url:pattern 是我的 resteasy webservice 应用程序路径:
Ext.BLANK_IMAGE_URL = '/ext-3.3.0/resources/images/default/s.gif';
var store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url:"/RestEasyDemo2/stud/student/read",
method:"GET"
}),
reader: new Ext.data.JsonReader({
fields:['id','name','address','gerder','emailId','contactNo'],
//id:'id',
root:'listing' // it's @XmlRootElement(name = "listing") of my list class
})
});
store.load();
网格面板代码是,
var grid = new Ext.grid.GridPanel({
store:store,
columns:[{header:'Id', width:170 , sortable:true, dataIntex:'id'},
{header:'NAME', width:170 , sortable:true, dataIntex:'name'},
{header:'Address', width:150 , sortable:true, dataIntex:'address'},
{header:'Gender', width:150 , sortable:true, dataIntex:'gender'},
{header:'EMAIL ', width:150 , sortable:true, dataIntex:'emailId'},
{header:'ContactNo ', width:100 , sortable:true, dataIntex:'contactNo'}
],
title:'My Contacts',
autoHeight:true,
width:590,
renderTo: Ext.getBody(),
loadMask: true,
//renderTo:document.body(),
fram:true
});
但是,json数据没有被显示......所以请告诉我我实际缺少什么......?