JSONP loading problem
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...
i have put my userData.json in the folder as.....
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
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.
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.
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.
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.
Originally Posted by dboy221
The callback is the function that wraps around the data. Take a look at this details description on wikipedia:
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.
Did you set the autoLoad configuration on Store or programatically invoke the load method on it?
Actually, I was able to find out that my wcf service needs to be configured to support JSONP. Working on doing this now.
Originally Posted by aconran
I'm facing the same problem: getting the same message when I try to load data from store, although the link works perfectly on browser and retrieves all available data.
Originally Posted by aconran
how should the autoLoad be configured on Store?
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
Thanks in advance!!!