Steve Lewis
18 Sep 2010, 12:54 PM
Hi,
I'm trying to populate a select form item from a store linked to a json data source. I seem to be able to load the data correctly (from json source) but can't seem to populate the select item. The setOptions gets called on onDataChanged callback but the select control never gets the appropriate values (I'm using 0.93 version of the library).
Any obvious problems?
Ext.regModel('Market', {
fields: [
{ name: 'value', mapping: 'id' },
{ name: 'data', mapping: 'name' }
]
});
this.marketStore = new Ext.data.Store({
model: 'Market',
proxy: {
type: 'scripttag',
url: CONFIG.api_host + "/api/consumer/markets/",
reader: {
type: 'json',
idProperty: 'id'
}
},
autoLoad: true,
listeners: {
scope: this,
single: true
});
{
xtype: 'select',
name: 'market',
store: this.marketStore,
]
}
];
I'm trying to populate a select form item from a store linked to a json data source. I seem to be able to load the data correctly (from json source) but can't seem to populate the select item. The setOptions gets called on onDataChanged callback but the select control never gets the appropriate values (I'm using 0.93 version of the library).
Any obvious problems?
Ext.regModel('Market', {
fields: [
{ name: 'value', mapping: 'id' },
{ name: 'data', mapping: 'name' }
]
});
this.marketStore = new Ext.data.Store({
model: 'Market',
proxy: {
type: 'scripttag',
url: CONFIG.api_host + "/api/consumer/markets/",
reader: {
type: 'json',
idProperty: 'id'
}
},
autoLoad: true,
listeners: {
scope: this,
single: true
});
{
xtype: 'select',
name: 'market',
store: this.marketStore,
]
}
];