I am using EXT JS 4.1.1.
I have a json response like this:
{ values: ["A","B","C"] }
I then have a model like so:
Ext4.define('model', {
extends: 'Ext4.data.model',
fields: [ 'name' ]
});
I am trying to create models with one value, name, that corresponds to the above json values so that I can use the name values in a ComboBox.
Ext4.define('store',{
extend: 'Ext4.data.Store',
model: 'model',
requires: 'model',
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'values',
successProperty: 'success'
}
}
});
The issue I'm having is that when populating my ComboBox with the name attribute, it is empty (""). The raw value is correct, it corresponds directly to the appropriate value.
How can I map this array of values correctly to a name field on my model model?