Hello!I'm use two comboboxes, select value in first fire ajax store update in second. Update works good, but on second and more updates in second combobox appear loading panel, which not closed, like this:Screen Shot 2011-11-30 at 19.38.28.png
extjs 4.0.7, code:
Code:
var languageStore = new Ext.data.Store({
autoLoad: true,
storeId: 'languagesStore',
proxy: {
type: 'ajax',
url: 'languages.json.php',
reader: {
type: 'json',
root: 'languages'
}
},
fields: [{name: 'id', type: 'int'}, {name: 'name', type: 'string'}]
});
var languageCombobox = new Ext.form.ComboBox({
fieldLabel: 'Язык',
id: 'language-combo',
store: languageStore,
disabled: false,
valueField: 'id',
displayField: 'name',
emptyText: 'Выберите страну…',
editable: false,
listeners:
{
select:
{
fn: function(combo, value)
{
var cc = Ext.getCmp('country-combo');
cc.clearValue();
if (cc.isDisabled())
cc.setDisabled(false);
cc.getStore().load({params: {languageId: combo.getValue()}});
}
}
}
});
var countryStore = new Ext.data.Store({
storeId: 'countriesStore',
proxy: {
type: 'ajax',
url: 'countries.json.php',
reader: {
type: 'json',
root: 'countries'
}
},
fields: [{name: 'id', type: 'int'}, {name: 'name', type: 'string'}]
});
var countryCombobox = new Ext.form.ComboBox({
fieldLabel: 'Страна',
id: 'country-combo',
store: countryStore,
disabled: true,
valueField: 'id',
displayField: 'name',
emptyText: 'Выберите страну…',
queryMode: 'local',
editable: false
});
Json answer look like this:
Code:
{"countries":[{"id":"1","name":"Great Britain"},{"id":"2","name":"USA"}],"total":2}
Can I hide this loading panel?