Despite researching various posts on the topic, I am still facing issues. Even after attempting to create a Panel with minimal data, I cannot seem to make it work. This problem is really puzzling me. Below is the code snippet that I am currently working with:
Ext.onReady(function () {
var proxy = new Ext.data.HttpProxy({
url: path/to/app,
api: {
load: path/to/app
}
});
var reader = new Ext.data.JsonReader({
successProperty : 'success',
idProperty : 'id',
root : 'data',
fields : [{name:'id', type: 'int'}]
});
var writer = new Ext.data.JsonWriter({
encode: false,
writeAllFields: true
});
var store = new Ext.data.Store({
autoLoad : true,
autoSync : true,
root : 'data',
restful : true,
fields : [{name: 'id'}],
proxy : proxy,
reader : reader,
writer : writer
});
Ext.create('Ext.grid.Panel', {
renderTo : 'gadgetview',
store : store,
columns : [{
header : 'ID',
text : 'ID',
dataIndex : 'id',
width : 50
}],
height : 200,
width : 450,
title : 'Example'
});
});
The server's response is as follows:
{"data":[{"id":1}], "success":true}
I'm optimistic that the solution is right in front of me.