View Full Version : Combobox directStore

20 Jun 2011, 12:31 AM

I'm using a combobox with the directStore to load his data, but when I click to load the data, the loading icon is show but, no result in my combo.

My code :

store: new Ext.data.DirectStore({
paramsAsHash: true,
root : 'data',
//myForm : formId.getForm().getFieldValues(),
command : 'comboGridUpdate',
notify : colItems[i][Enum_WidgetAttribute.NOTIFY]['click'],
screenNum : this.screenNum,
fieldName: colItems[i][Enum_WidgetAttribute.FIELDNAME]||wgt.name

And the JSON result :


21 Jun 2011, 8:19 PM
Not sure about the details for a DirectStore but by the looks of it your root is incorrect (should be 'result.data') and you don't have any fields configured. Getting it working with an array of strings like you have in your response could be a little tricky too: could probably do it by overriding extractValues() but if possible it'd be easier to change the server response.