lundi 29 décembre 2014

Extjs 4.2.1 - data store load all fields from the server


Vote count:

0




Is there a way to make the data store to create a model containing all the fields retrieved from the server?


Lets say we have on the server side the object:



User : {
name: "...",
phone: "...",
Address: {
street: "...",
country: "...",
},
...
...
}


And we use the following store to load this user:



var myStore = Ext.create('Ext.data.Store', {
proxy: {
type: 'ajax',
url: '...',
reader: {
type: 'json',
root: 'users'
}
},
fields :[name, phone],
autoLoad: true
});


Is there a way to config the fields inside the data store to retrieve all the fields from the user without a specific mapping like the example (name, phone)? I mean, can I put something like ** in the fields attribute that will say to the data store, map all the fields retrieved as they are, and the result will be a store with the user's name, phone and address?


Thanks.



asked 33 secs ago







Extjs 4.2.1 - data store load all fields from the server

Aucun commentaire:

Enregistrer un commentaire