Arnaud Forcinal
17 Oct 2011, 4:37 AM
I have discovered an issue with ComboBox in Ext GWT 2.2.5.
The context:
I have a ComboBox that is not rendered (it is rendered for some users, and not rendered for others, but it's always part of the form). This ComboBox is linked to a store backed by a loader/proxy and the force selection attribute is set.
Behavior in Ext GWT 2.2.4:
setValue() is called to set the combobox value and getValue() is returning this value.
Behavior in Ext GWT 2.2.5:
setValue() is called to set the combobox value and getValue() is returning null.
Analysis:
When the setValue() is called, a blur event is fired on the ComboBox and the triggerBlur() method is executed. This method then calls doForce(). The new behavior of doForce() is to try to initialize the box list if the initialized flag is not set and this sets the initialize flag.
After that the getValue() call doesn't exit with the stored value as the initialized flag is set but instead tries to get the available values from the store and match the stored value with those. This does not work because if the store is backed by a loader/proxy it won't have any value before the doQuery method is called to load the store. As the ComboBox is not rendered, the doQuery method is not called and the store has no values. The getValue() method then returns null.
I think the issue is that the doForce() method should not have the side-effect of setting the initialized flag.
Regards,
The context:
I have a ComboBox that is not rendered (it is rendered for some users, and not rendered for others, but it's always part of the form). This ComboBox is linked to a store backed by a loader/proxy and the force selection attribute is set.
Behavior in Ext GWT 2.2.4:
setValue() is called to set the combobox value and getValue() is returning this value.
Behavior in Ext GWT 2.2.5:
setValue() is called to set the combobox value and getValue() is returning null.
Analysis:
When the setValue() is called, a blur event is fired on the ComboBox and the triggerBlur() method is executed. This method then calls doForce(). The new behavior of doForce() is to try to initialize the box list if the initialized flag is not set and this sets the initialize flag.
After that the getValue() call doesn't exit with the stored value as the initialized flag is set but instead tries to get the available values from the store and match the stored value with those. This does not work because if the store is backed by a loader/proxy it won't have any value before the doQuery method is called to load the store. As the ComboBox is not rendered, the doQuery method is not called and the store has no values. The getValue() method then returns null.
I think the issue is that the doForce() method should not have the side-effect of setting the initialized flag.
Regards,