Memo about combo. setvalue initialization combo Value

Source: Internet
Author: User

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 ());
}
}

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.