Just to confirm, you mean like the following:
Code:
Ext.regStore('NearHomeStore', {
model: 'Pub',
sorters: 'suburb',
autoLoad: true,
pageSize: 15,
clearOnPageLoad: false,
getGroupString: function(record) {
return record.get('suburb');
},
proxy: {
type: 'scripttag',
url: 'http://api.pubbly.com.au/pubs/nearby.json',
reader: {
type: 'json',
root: 'results'
},
listeners:{
exception:function(proxy, response, orientation){
Ext.Msg.alert('API connectivity error.', response.statusText);
}
}
}
});
Code:
Ext.regStore('NearCityStore', {
model: 'Pub',
sorters: 'suburb',
autoLoad: true,
pageSize: 15,
clearOnPageLoad: false,
getGroupString: function(record) {
return record.get('suburb');
},
proxy: {
type: 'scripttag',
url: 'http://api.pubbly.com.au/pubs/nearby.json',
reader: {
type: 'json',
root: 'results'
},
listeners:{
exception:function(proxy, response, orientation){
Ext.Msg.alert('API connectivity error.', response.statusText);
}
}
}
});