[4.0.2] combobox setValue doesn't as expected

[4.0.2] combobox setValue doesn't as expected

REQUIRED INFORMATION

Ext version tested:

Ext 4.0.2

Browser versions tested against:

Chrome 12 (OS X)

Firefox 4 (OS X)

Safari 5.0.5 (OS X)

Description:

If the valueField is mapped to type:'int' field in the store, the setValue() function does not work consistently as expected. This was not a problem in Extjs 3.x
according to documentation setValue(string|array), however setting value with quotes as string does not work if the valueField is tied to an integer field.

myCombo.setValue('2'); //does not work
myCombo.setValue(2); //works as expected

This is a problem because I parse the History token into an object and all the values are strings. When the object is used to setValues of the form, it doesn't work properly.

Steps to reproduce the problem:

create a combobox whose model has a defined idProperty with 'int' type.

call the setValue() function with a quoted integer value

The result that was expected:

The value of the combobox is set and the correct text(displayField) is selected from the underlaying store.

If you want to set a string value into it, why not just define the id field in the Model as a string (or 'auto')?

In other words, why declare the field in the model as an int if you don't want to treat it as such? Your usage (History token) implies that you're treating the value as a string, so I'd roll with that.

thanks for the report, we've just introduced a new bug template that will help us migrate bugs from the forums to our bug tracker. Could you please update your ticket to follow this template so that we can address it faster?

thanks for the report, we've just introduced a new bug template that will help us migrate bugs from the forums to our bug tracker. Could you please update your ticket to follow this template so that we can address it faster?