Je travaille sur l'affichage d'une grille ExtJS. J'ai tout correct sauf la partie sur le proxy avec dans le magasin Json. Lorsque je tente d'afficher renvoie une erreur:ExtJS Grid Erreur de proxy du magasin JSON
this.proxy is undefined Ext.data.Store=function(A){this.data=n...ta=C;this.resumeEvents();return B}});
Je compris que je dois faire quelque chose dans le magasin, mais pas sûr de ce. les données de la liste de variables ont la chaîne JSON Array. S'il vous plaît toute aide est vraiment appréciée. merci
var listData = <%= aItems %> ;
var AIGrid;
Ext.onReady(function() {
var AIRecord = Ext.data.Record.create([{
name: "ID",
type: "int",
mapping: "ID"
}, {
name: "WSTITLE",
type: "string",
mapping: "WSTITLE"
}, {
name: "REQ_ATTUID",
type: "string",
mapping: "REQ_ATTUID"
}, {
name: "DESCRIPTION",
type: "string",
mapping: "DESCRIPTION"
}, {
name: "RES_ATTUID",
type: "string",
mapping: "RES_ATTUID"
}, {
name: "RESOLUTION",
type: "string",
mapping: "RESOLUTION"
}, {
name: "START_TIME",
type: "string",
mapping: "START_TIME"
}, {
name: "END_TIME",
type: "string",
mapping: "END_TIME"
}]);
var AIreader = new Ext.data.JsonReader({
root: "root",
id: "ID"
}, AIRecord);
var AIstore = new Ext.data.Store({
nocache: true,
data: listData,
reader: AIreader
});
var AIcol = new Ext.grid.ColumnModel([{
header: 'ID',
readOnly: true,
dataIndex: 'ID',
width: 30
}, {
header: 'Work Step',
dataIndex: 'WSTITLE',
width: 200,
readOnly: true
}, {
header: 'Requester',
dataIndex: 'REQ_ATTUID',
width: 80,
readOnly: true
}, {
header: 'Description',
dataIndex: 'DESCRIPTION',
width: 300,
readOnly: true
}, {
header: 'Resolver',
dataIndex: 'RES_ATTUID',
width: 80,
readOnly: true
}, {
header: 'Resolution',
dataIndex: 'RESOLUTION',
width: 300,
readOnly: true
}, {
header: 'Start',
dataIndex: 'START_TIME',
width: 100,
readOnly: true
}, {
header: 'End',
dataIndex: 'END_TIME',
width: 100,
readOnly: true
}]);
AIcol.defaultSortable = true;
AIGrid = new Ext.grid.GridPanel({
store: AIstore,
renderTo: 'listgrid',
cm: AIcol,
enableColLock: true,
title: 'Open Action Items',
width: 900,
height: 500,
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true
})
});
AIGrid.store.load();
});