Hi,
tested: with SmartClient 10.x 2016-01-15
In ComboBoxItem._shouldFetchMissingValue(), there is a bug then this method lookups inside pickList,
if it found a record and then call _addDataToDisplayFieldCache it must also call updateDisplayValueMap(true); to recalculate _displayValueMap according to newly added "recordFromPickList"
otherwise ComboBoxItem will display "ID" instead of real value.
Snippet from ComboBoxItem.js and where to add a line:
tested: with SmartClient 10.x 2016-01-15
In ComboBoxItem._shouldFetchMissingValue(), there is a bug then this method lookups inside pickList,
if it found a record and then call _addDataToDisplayFieldCache it must also call updateDisplayValueMap(true); to recalculate _displayValueMap according to newly added "recordFromPickList"
otherwise ComboBoxItem will display "ID" instead of real value.
Snippet from ComboBoxItem.js and where to add a line:
Code:
_shouldFetchMissingValue : function (value, fieldName) {
if (this.fetchMissingValues == false) return false;
var ods = this.getOptionDataSource();
if (ods == null) return false;
var superShouldFetch = this.Super("_shouldFetchMissingValue", arguments);
if (superShouldFetch == false) return false;
if (value != null && ods) {
var recordFromPickList = this.pickList && this.getPickListRecordForValue(value, fieldName);
if (recordFromPickList != null) {
// Store the record from the pickList in our displayField cache
this._addDataToDisplayFieldCache([recordFromPickList]);
this._updateSelectedRecord();
this.updateDisplayValueMap(true); // <- this line must be added
return false;
}
}
return superShouldFetch;
},
Comment