View Full Version : Combobox problem/bug?

27 Aug 2012, 3:06 AM
Hi, I have a problem using a combobox with records having the same display value.

Ext.create('Ext.form.field.ComboBox', {
displayField : 'name',
valueField : 'identifier',
queryMode: 'local',
forceSelection: true,
store : Ext.create('Ext.data.Store', {
fields : [ 'identifier', 'name' ],
autoLoad : true,
{identifier: 1, name: 'myTest'},
{identifier: 2, name: 'myTest'},
{identifier: 3, name: 'myTest'}

I reduced my code to the testcode posted above which in general works fine.
combo.getRawValue() is 'myTest' BUT combo.getValue() always returns 1 no matter if I select the first, second or third entry.

Even more confusing is, if I add a beforeselect or select listener, the record used is right.
Is it possible that the getValue() method somehow is buggy or does not really work on the selected record?



27 Aug 2012, 12:59 PM
Your attached sample code is working fine for me running 4.1.1. It is always returning the identifier that I clicked on. Do you have any overrides defined or any other code that may be affecting the value that is returned?

27 Aug 2012, 1:09 PM
Please upgrade to 4.1.1, as this was a known issue with previous versions.


27 Aug 2012, 9:49 PM
that's it, I was not on 4.1.1 yet

thx a lot