Example:
Model 1
Ext.create('Ext.data.Store', { model: 'EmployeeType', data : [ {type: 1, description: 'Administrative'}, {type: 2, description: 'Operative'}, ] });
Model 2
Ext.create('Ext.data.Store', { model: 'BloodType', data : [ {type: 1, description: 'A+'}, {type: 2, description: 'B+'}, ] });
Even if your stores have a proxy server, you can disable AutoLoad so that you can download as many as you want in a single request, for example:
Create repositories manually:
employeeType = Ext.create('Ext.data.Store', {model: EmployeeType}); bloodType = Ext.create('Ext.data.Store', {model: BloddType});
Create an Ajax request in which you enter all the combos at the same time:
Ext.ajax.request({ url: './catalogs/getalldata', success: function(response) { var json = Ext.decode(response.responseText); employeeType.loadData(json.employeeTypes); bloodType.loadData(json.bloodTypes);
source share