-
7 May 2012 2:33 AM #1
JSONP loading problem
JSONP loading problem
Hi
I am trying to populate a simple list witha data from a json. Each entry contain only 3 fields.
i set up my json store , proxy and also the reader as given on the architect docs page...
http://docs.sencha.com/architect/2-0...tores_examples
i have put my userData.json in the folder as.....
/NavigationExample/app/data/userData.json
where NavigationExample is my project.
the URL prefix is set in settings as http://localhost:8080/Projects/NavigationExample
while in JSONProxy I have set url as - http://localhost:8080/Projects/Navig.../userData.json
when i load the store..it gives an error saying
Unable to load data using the supplied configuration.
Open in Browser: http://localhost:8080/Projects/Navig.../userData.json
when click on the link the json file perfectly opens in the browser.
Where am i going wrong?
Thanks in advance
-
7 May 2012 3:39 AM #2
Are you using JSON-P? Have you wrapped your json data in a callback? It looks like you are using static json data and should be using a json proxy.
Aaron Conran
@aconran
Sencha Architect Development Team
-
7 May 2012 9:43 PM #3
Thank You
Thank You
Hi aconran
Thanks alot for ur help. I got myself educated because of your reply. N i could load my json data in the project. Thanks alot.
Going to try the same with XML data soon. Might have to come back as i m still a newbie.
Thanks again for your help.
-
28 Sep 2012 11:56 AM #4
I am having the same issue. I have a wcf (.net) service that is called and is resolved and returns the json formatted data. Aconran can you explain more about the callback. I'm using JSONP as the proxy type and for the reader I have provided json as the type.
-
28 Sep 2012 1:13 PM #5
JSONP is typically used in environments where you must load data from a different domain. If you are trying to load data from the same domain, you really should be just using a simple AjaxProxy and JSONReader.
The callback is the function that wraps around the data. Take a look at this details description on wikipedia:
http://en.wikipedia.org/wiki/JSONPAaron Conran
@aconran
Sencha Architect Development Team
-
28 Sep 2012 9:14 PM #6
Thanks for the wiki reference. That really helped as I was able to load the data in the store using "Load Data" However, when I preview my app live in the browser it does not show the data being pulled in.
-
1 Oct 2012 10:19 AM #7
Did you set the autoLoad configuration on Store or programatically invoke the load method on it?
Aaron Conran
@aconran
Sencha Architect Development Team
-
1 Oct 2012 6:38 PM #8
-
17 Jan 2013 4:01 AM #9
-
1 Mar 2013 6:25 AM #10
Not able to load data using jsonp using sencha architect2
Not able to load data using jsonp using sencha architect2
Hii... managed to display data using a webservice url in list with
navigation view in the designer part of sencha architect2 but when it
runs in browser it displays empty then upon some reference for cross
domain heard JSONP should be used.. But not able to even load data to
store using jsonp.. It displays error "unable to load data with
specified configuration".. I loaded model using rest proxy, even i
changed it to jsonp and ajax but result is same..is ter any changes to
be made..
Thanks in advance!!!


Reply With Quote