PDA

View Full Version : combo box after select



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
});

Animal
30 Nov 2009, 4:51 AM
Wrong forum. Is this Ext 2.0, or 3.0? I'll move the thread accordingly.

YankeeImperialistDog
30 Nov 2009, 5:52 AM
thanks, i appreciate the help.

Animal
30 Nov 2009, 5:53 AM
Ext 2 or Ext 3?

YankeeImperialistDog
30 Nov 2009, 6:28 AM
I'm trying to work with 3.0.3 (Enfield Version). While attempting to manually do JSON i ran into trouble and it's been suggested there may be a bug. For this example I got it to work using the last version, but i plan to use 3.0.3. I suspect this possible bug will be a non-issue when i start using a standard library like http://james.newtonking.com/projects/json-net.aspx to format my JSOPN Response. I'm starting today. Letís go with 3.0.3.

(I fired one of those (303) when i was a kid. The kick was a lot for an 11 year old, but I knew it would be nothing compared to being on the other end! I wage peace as an adult, but who could not admire British craftsmanship at its best!!)

YankeeImperialistDog
30 Nov 2009, 6:32 AM
i didn't notice till just now you are from the UK! Cool. o hope you accept my last statement as a complament!

Animal
30 Nov 2009, 7:26 AM
OK, not sure what you mean here.

When you select an item, the list disappears anyway.

You mean that thereafter, when you click the trigger, the other Store entries are filtered out? Because if that's the case, you need triggerAction: 'all'

YankeeImperialistDog
30 Nov 2009, 7:43 AM
Thank you that did it.
Still getting started and have much to learn.

Kurt Schroeder
The "Yankee Imperialist Dog"

(and please say you know what a 303 is!!! ;) )

Animal
30 Nov 2009, 8:55 AM
Yes, it's a rifle. I think my dad used one in his National Service back in the 50s.

YankeeImperialistDog
30 Nov 2009, 9:38 AM
Used in both wars up to the 50's. Excelent workmanship it was in a class by itself like the American Colt 45 and the German Machinengewehr 34-42. I have no need to own one, thank you God!, but i can admire the genius of design and manufacture!