View Full Version : ComboBox default values from reader

15 Mar 2010, 9:51 PM
I am currently working on the desktop example, and one of my windows consists of a grid where you can select a row and click an 'Edit' button to bring up a new window which consists of a form for editing the item you selected. This new window is loaded with the necessary XML data. My problem is that I can not get the combo box to load this data.

This is how I am loading the new window from the original window. There is probably a better way to do this, so please point me in the right direction if there is.
//... handler:function()
url: 'modules/Newsletter/GetNewsletterXML.php?id=' + Ext.getCmp('view-newsletters-grid').getSelectionModel().getSelected().id

/*And here is the XMLReader I am giving to the form of the edit window. Recipients is the data needed for the combo box (it has data like this: '1,4,12')*/
var newsletterReader = new Ext.data.XmlReader(
record : 'Newsletter',
success: '@success'

All the text fields are automatically filled with the data read from the XML. I know I can use comboBox.setValue(recipients); but how do I get 'recipients'. Do I have to use a store, or is there a way to read values into a combo box the same way you can with a text field.

Any help is greatly appreciated.

16 Mar 2010, 2:17 PM
Anyone? I still have not found a solution to this.