How to solve the loading error in the Combobox interaction of Extjs4

Source: Internet
Author: User

How to solve the loading error in the Combobox interaction of Extjs4

When combobox is selected repeatedly, the lower-level Combobox will have a loading error, even though the Store data has been loaded.

You will know how to deal with the Code: (pay attention to the key statements in the red part)


},{
Xtype: 'combobox ',
LabelStyle: 'color: blue ;',
LabelWidth: 70, // label width
Width: 200, // field width
MsgTarget: 'day ',
AllowBlank: false, // whether null values are allowed
LabelStyle: 'color: red ;',
Value :'',
EmptyText: 'select a superior department .... ',
QueryMode: 'local ',
DisplayField: 'deptname ',
ValueField: 'deptname ',
Store: myUpDeptStore,
Editable: false,
TriggerAction: 'all ',
FieldLabel: "superior department ",
Listeners :{
'Select': function (combo, record, number) {// This event returns the record value of the selected item in the store. The index parameter is the Sn.
Var _ value = combo. getValue ();
Ext. getCmp ('addptcombo '). clearValue ();
Ext. getCmp ('addptcombo '). store. load ({params :{
UpDept: _ value // record [0]. data. DeptName
}
});
}
},
Name: "UpDept"
},{
Xtype: 'combobox ',
Id: 'addptcombo ',
DefaultListConfig: {// cancel the loading Mask
LoadMask: false
},
LabelStyle: 'color: blue ;',
LabelWidth: 70, // label width
Width: 200, // field width
MsgTarget: 'day ',
AllowBlank: false, // whether null values are allowed
LabelStyle: 'color: red ;',
Value :'',
EmptyText: 'select a department/team .... ',
QueryMode: 'local ',
DisplayField: 'deptname ',
ValueField: 'deptname ',
Store: myDeptStore,
Editable: false,
FieldLabel: "department ",
Name: "Dept"
}]


Note: This error should be caused by the Extjs Bug. The data has been loaded but the Mask layer has not been canceled, so we can only remove it manually.

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.