Below is the way it works.//function that gets city store
function getCityStore()
{
var store = new Ext.data.JsonStore({
url: ‘get-city-by-country-id’,
//baseParams: countryId:countryIdVar,
fields: [
{name:’cityId’, type:’int’},
‘cityName’
]
});
return store;
}//than I have a countries combo
var countries = new Ext.form.ComboBox({
id:’country’,
store: getCountryStore(),
typeAhead: true,
triggerAction: ‘all’,
emptyText: ‘…’,
listeners: {
select: {
fn:function(combo, value) {
var modelDest = Ext.getCmp(‘city’);
//set and disable cities
modelDest.setDisabled(true);
modelDest.setValue(“);
modelDest.store.removeAll();
//reload region store and enable region
modelDest.store.reload({
params: { countryId: combo.getValue() }
});
modelReg.setDisabled(false);
}
}
}
})Hope it will help someone …