View Full Version : [Solved]Strange behaviour of combobox in form using direct

4 Apr 2010, 8:38 AM
Using a combobox in a form that uses ext.direct to load / save leads to trouble with "hiddename", "name" property. Either combo does not load or it does submit the display value.

fieldLabel: this.hosttypeText
,xtype: 'combo'
,name: 'hosttype' // needed to get load working but then submit sends displayField - and - must not enable hiddenName
//,hiddenName:' hosttype' // needed to submit valuefield - but then load fails
,mode: 'local'
,editable: false
,triggerAction : 'all'
,forceSelection: true
,valueField: 'value'
,displayField: 'name'
,store: new Ext.data.ArrayStore({
fields: ['value', 'name']
,data : [
['shost', this.shostText]
,['vhost', this.vhostText]

To get load working i need to enable "name". However then submit sends the content of displayField. (expected)

To get submit use valueField, i have to enable "hiddenname", but then load no longer works. (unexpected)
When Setting both "name" and "hiddename, load fails.
Using different values for "name", "hiddenname" did not help.

Any ideas?

Just in case, the JSON returned on load


4 Apr 2010, 8:46 AM
Found the issue right after posting. Note the space before hosttype. (:|

,hiddenName:' hosttype'

4 Apr 2010, 9:12 AM
all this issues took me a while too. But if you got it once it's a real pleasure with ExtDirect, i love it!

Sleep well :)