View Full Version : Store + component field mapping issue?

28 Apr 2011, 5:53 AM

I am trying to figure out an issue with a component not displaying data from a store of mine correctly. The store I have configured is as followed:

Ext.regModel('Vehicle', {
fields: [
{name: 'untID'},
{name: 'untName'}

this.TrackingListStore=new Ext.data.ArrayStore({
storeId: 'TrackingListStore',
model: 'Vehicle'

});I'm then manually loading with some test data as follows:

this.appHub.TrackingListStore.loadData([[8202,"A13 KCT"],[8201,"A15 KCT"]], false);I have a list component with a template config:

itemTpl: '<tpl for="."><div>{untID} - {untName}</div></tpl>'But all thats happening is I get two rows rendered in the component with the dash symbols in my template and not my untID and untName values. So its seems the component is finding two records in my store, but is having trouble looking up the field name\values.

In Chrome debugger, inspecting the store object, I see the data loaded for each record is not a true object, at least not in the form I am used to from using ExtJS:

this.appHub.TrackingListStore.data: Ext.util.MixedCollection

allowFunctions: false
events: Object
getKey: function (record) {
items: Array[2]

0: subclass

data: Object

8202,A13 KCT: undefined

Where am I going wrong?

Thanks in advance :)