I have created a WCF service an attempt to call it. I am able to hit the service and get the JSON formatted results. However, when trying to populate a list with the results I do not see the results displayed. I have added logging on the load event for the store to see the number of records returned and I get an undefined for records.length. I have post the code for both the store/model and the view. Thanks in advance to all that help. (S/N, i'm using 1.1 as i'm learning Sencha from an ebook purchased an no relevant literature exist for v2.0)
/*Model/Store Definition*/
Code:
Ext.regModel('CTS.model.Resources', {
fields: [
{ name: 'ID', type: 'int' }
,{ name: 'Name', type: 'string' }
, { name: 'Type', type: 'string' }
]
});
Ext.regStore('CTS.store.Resources', {
model: 'CTS.model.Resources',
autoLoad: true,
proxy: {
type: 'ajax',
method: 'GET',
url: 'http://localhost:50196/WebServices/WebServiceResources.svc/getresources',
reader: { type: 'json' }
}
,
listeners: {
load: function (records) {
console.log('Loading...' + records.length + ' records');
}
}
});
/*View Definition*/
Code:
CTF.view.Resources = Ext.extend(Ext.Panel, {
id: 'resources',
fullscreen: true,
initComponent: function () {
Ext.apply(this, {
dockedItems: [],
items: [{
id: 'lstResources',
xtype: 'list',
store: 'CTS.store.Resources',
itemTpl: '{Name}'
}]
});
CTF.view.Resources.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg('resources', CTF.view.Resources);