Lets suppose I have this web application built using extjs4 in my client-side and a Zend framework action controller in server-side. I have array of arrays in server-side that they could be output as JSON to the client.when i want to create only one store,usual way is working like this:
Ext.define('MA.store.AdminResources', {
extend : 'Ext.data.Store',
fields : [ {
name : 'id'
}, {
name : 'name'
} ],
autoLoad : true,
proxy : {
type : 'ajax',
url : './account/adminresources',
reader : {
type : 'json'
//,root : 'users'
}
}
});
what if i wanted to create multiple JSON stores from just A single http request to the server? this server will not receive a remote proxy request per store and one request will be done for ALL stores. Here is an example of my JSON which is returned by server:
{
"adminsettings"{"userid":3333,"primaryemail":"[email protected]","firstname":"","middlename":null}
,"countries":{"AD":"Andorra","AE":"UnitedArabEmirates","AF":"Afghanistan"...}
,"languages":{"aa":"Afar","ab":"Abkhazian","ace":"Achinese","ach":"Acoli"...
}}
How can JSON stores for adminsettings,countries,languages be created with just one http request to the server? perhaps i need to define one proxy and 3 readers?!