PDA

View Full Version : Bind JSON output to a view.



shashi@sencha
11 Dec 2013, 3:02 AM
Hello all,

I have a view in which I have to show the list of subscription returned by webservice in JSON format.

the fields that I have to show includes name, expiration etc.


Since I am new to sencha so I am very much confused how to proceed.

Anybody please guide me step by step.

although I find one way to do this is create store and use it, bbut i am not sure how to do this, because all the examples I have seen are giving URL in the proxy of store, but I dont have to do that, I am calling the service from the controller and from there itself I want to activate the view with the loaded data.


Thanks.

Gary Schlosberg
11 Dec 2013, 5:59 AM
You might take a look at the example on this documentation page as a starting point. Then let us know if you have specific questions.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.view.View

shashi@sencha
13 Dec 2013, 2:29 AM
Hi Gary,

Thank you so much for the answer, it helps me.
What I did is actually I created a store and model, got the JSON response in an object then loaded that object to store by "Ext.getStore('storeName').loadData(object).
and bound the store to the view. it is working fine.


Thanks again for the help. :)