YankeeImperialistDog
29 Nov 2009, 8:37 AM
I'm loading a combo box with JSON data. It loads ok, but when i select an item in the list all other options disapear. I'm not sure if this is by design and/or i have forgotten a setting. To be clear it loads fine, but i want the values to persist after selection. I'm hoping i do not have to call the load function again, but still learning the right way to work with forms.
If there is not enough information please tell me specificly what i need to include.
here is my combo box:
{
xtype: 'combo',
name: 'genre',
fieldLabel: 'GenreJSON',
mode: 'local',
store: movieGenre_data,
valueField: 'IntId',
displayField: 'GenreName',
width: 120,
listeners: {
select: function(f, r, i) {
if (i == 1) {
Ext.Msg.prompt('New Genre', 'Name', Ext.emptyFn);
}
}
}
}],
here is my reader:
var movieGenre_data = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: '/Form/MovieGenreData/' }),
reader: new Ext.data.JsonReader({}, ['IntId', 'GenreName']), remoteSort: false
});
If there is not enough information please tell me specificly what i need to include.
here is my combo box:
{
xtype: 'combo',
name: 'genre',
fieldLabel: 'GenreJSON',
mode: 'local',
store: movieGenre_data,
valueField: 'IntId',
displayField: 'GenreName',
width: 120,
listeners: {
select: function(f, r, i) {
if (i == 1) {
Ext.Msg.prompt('New Genre', 'Name', Ext.emptyFn);
}
}
}
}],
here is my reader:
var movieGenre_data = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: '/Form/MovieGenreData/' }),
reader: new Ext.data.JsonReader({}, ['IntId', 'GenreName']), remoteSort: false
});