views:

46

answers:

1

Hi i am working on displaying a ExtJS Grid. I got everything correct except the part about proxy with in the Json store. When I try to display it throws an error. I figured out that i need to do something in the store but not sure what. the variable list data has the Json Array string. Please any help is really appreciated. thanks

this.proxy is undefined

Ext.data.Store=function(A){this.data=n...ta=C;this.resumeEvents();return B}});

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();

        });
A: 

I got the answer. with a little extra research over the internets. I used MemoryProxy to load the local data. that solved the problem. Yay!!