View Full Version : Integrating Ext.form.ComboBox w/ Existing AJAX call & Changing Ext.Window items

17 Jan 2012, 11:00 AM

I'm still looking through the forums, but not found quite what I need. This is probably trivial ?

1. An Ext.form.ComboBox on a tbar inside an Ext.Window needs to be populated with items using an existing javascript routine that does the AJAX call and returns JSON.

2. I need to switch out the items in the Ext.Window. (Update a Chart using the JSON data).

All I'm finding so far is using JsonStore's and not sure if the myWindow.add(myItems) is going to do the trick?


17 Jan 2012, 11:19 AM
So all you have to do is remove and add items.

17 Jan 2012, 2:48 PM
Perhaps I should be more clear.

- I need to take JSON data and load it into the combo box (a) after I've already rendered an Ext.Window (with the combo box in the tbar) (b) without using a Sencha store (I have to use an existing javascript method doing an AJAX call returning JSON).

I see the update method on Ext.form.ComboBox, but still looking for an example.

17 Jan 2012, 6:01 PM
You can't avoid using a store: a combobox has a store no matter what.


The store doesn't have to do the Ajax request. Given what you've described I'd say the easiest way to do it is to create an empty store for your combobox and just load the data in once you have it.

Some docs that might prove helpful: