I am new to sencha touch can any one help me, what is the way to get data from server. I didn't understand clearly. Please help me. In need to display the values from server to grid. I dont how to do that.Now I have added the values directly to grid store.
3 Answers
You should dive deeper into two aspects of Sencha Touch: models and stores. A model is simply a representation of an object. For example, you could define 'User' as a model with the fields 'id', 'username', 'email'. Stores can be seen as collections of model-objects.
The beauty of Sencha is that the models / stores can be given a proxy parameter. There are various proxies available, but you should choose the one that suits application the best. For example, the AjaxProxy sends a request to the server to load the data. Once your store is loaded (please not that AJAX calls are made asynchronous) you can populate it in for exampe a List or NestedList.
Some example code, directly taken from the docs:
Ext.regModel('User', {
fields: ['id', 'name', 'email']
});
//The Store contains the AjaxProxy as an inline configuration
var store = new Ext.data.Store({
model: 'User',
proxy: {
type: 'ajax',
url : 'users.json'
}
});
store.load();

- 5,491
- 4
- 33
- 41
-
Hey pls see this...http://stackoverflow.com/questions/9563417/how-to-consume-soap-web-service-in-sencha-touch. and try to answer it... – himanshu Mar 06 '12 at 11:30
you can use this tutorial. it's very useful
http://programmersgoodies.com/how-to-parse-xml-response-with-sencha-touch#comment-27

- 217
- 3
- 4
- 9
-
Hey pls see this...http://stackoverflow.com/questions/9563417/how-to-consume-soap-web-service-in-sencha-touch. and try to answer it... – himanshu Mar 06 '12 at 11:30