Я исследую данные о загрузке в extjs gid 4 с использованием данных json
Код в App.js
/*
* Ext JS Library 2.0.2
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
Ext.onReady(function () {
var proxy = new Ext.data.HttpProxy({ url: 'source.htm' });
//Reader
var reader = new Ext.data.JsonReader(
{
}, [
{ name: 'appeId', mapping: 'appeId' },
{ name: 'survId' }, {name: 'location' },
{ name: 'surveyDate' },
{ name: 'surveyTime' },
{ name: 'inputUserId' }
]
)
var store = new Ext.data.Store({
proxy: proxy,
method: 'POST',
reader: reader
});
store.load();
// create the grid
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{ header: "appeId", width: 60, dataIndex: 'appeId', sortable: true },
{ header: "survId", width: 60, dataIndex: 'survId', sortable: true },
{ header: "location", width: 60, dataIndex: 'location', sortable: true },
{ header: "surveyDate", width: 100, dataIndex: 'surveyDate', sortable: true },
{ header: "surveyTime", width: 100, dataIndex: 'surveyTime', sortable: true },
{ header: "inputUserId", width: 80, dataIndex: 'inputUserId', sortable: true }
],
renderTo: 'example-grid',
width: 540,
height: 200
});
});
Код по умолчанию.Но я не могу загрузить данные в сетку extjs 4, и произошла ошибка:
Line: 25557
Error: 'this.model.prototype' is null or not an object