I am having trouble with displaying columns in my jsp which fetches json data. I am retrieving this json data in my javascript and using Ext.data.JsonStore
but the columns are not showing up as expected.
Here is the code for the store:
store = new Ext.data.JsonStore({
url: url_servlet+'Kadastr.jsp',
fields: [
{name: 'indoor', type: 'bool'},
{name: 'kad_id', type: 'integer'},
{name: 'kad_name',type: 'string'}
]
});
store.load();
And here is the code for the columns:
var cm = new Ext.grid.ColumnModel({
columns: [{
xtype: 'checkcolumn',
header: '',
dataIndex: 'indoor',
width: 50
}, {
header: 'id',
dataIndex: 'kad_id',
width: 70
},{
id: 'kad_name',
header: 'Участок',
dataIndex: 'common',
width: 130,
}]
})
Next, we have the grid panel:
var kad_tab = new Ext.grid.GridPanel({
store: store,
cm: cm,
id: 'kad_greed',
title:'Список Участков',
autoScroll: true,
Finally, here is some java code snippet:
JSONObject resultJson = new JSONObject();
resultJson.put("indoor",new Boolean(false));
resultJson.put("kad_name",fileName);
resultJson.put("kad_id",new Integer(fileId));
out.println(resultJson.toString());
Do you have any ideas on what might be missing or incorrect in the setup?