I encountered this problem after debugging for half a day, but I couldn't. I searched the internet and found the answer. I forgot it.
In other words, this is really a little funny. This is not a runtime, and you cannot use setvalue to indirectly select an item. This design is really inexplicable. Note that setvalue is not used only during initialization.
Thanks to javaeye, author of the original article: http://seraph115.javaeye.com/blog/234075
The original article is as follows:
Reason:The ComboBox component is used in forms built based on ext, And the hiddenname method is used for submission. The backend can receive the selected valuefield value to save it.
Problem:The value must be refilled to ComboBox on the modification page, but ComboBox displays the valuefield value instead of the displayfield value. The solution is to add the listener backfilling display value in the ComboBox store.
Listeners :{
Load: Function (){
Typecombo. setvalue (typecombo. getvalue ());
}
}