-
31 Aug 2012 7:09 AM #11
You have done what?
You have done what?
It seem i've a similar problem. I see the Data in the Grid. Every thing works fine (autocolumn etc...)
But i see nothing in the Browser. So what have you done exactly to solve the problem?
Uwe
-
31 Aug 2012 9:10 AM #12
Set the autoLoad configuration to true.
Aaron Conran
@aconran
Sencha Architect Development Team
-
1 Sep 2012 6:23 AM #13
yepp - this was the first idea! But doesn't work.


Code looks like ...
Code:Ext.define('MyApp.store.CustomerStore', { extend: 'Ext.data.Store', requires: [ 'MyApp.model.CustomerData' ], constructor: function(cfg) { var me = this; cfg = cfg || {}; me.callParent([Ext.apply({ autoLoad: true, storeId: 'MyJsonStore', model: 'MyApp.model.CustomerData', proxy: { type: 'ajax', url: 'http://xxx-shop.de/webService.php', reader: { type: 'json', root: 'Items' } } }, cfg)]); } });Last edited by aconran; 1 Sep 2012 at 10:21 AM. Reason: add code tags
-
1 Sep 2012 10:22 AM #14
Is the application being deployed on the same domain? xxx-shop.de?
It will only work on that domain due to cross domain restrictions of XHR. You are much better off using relative urls to access the data so that the app can run on multiple different environments.Aaron Conran
@aconran
Sencha Architect Development Team
-
1 Sep 2012 10:35 AM #15
Your problem is probably the same as this one:
http://www.sencha.com/forum/showthre...with-RestProxy
I could solve it because I'm developing the back end too, so I just moved the folder from the other context to the same of the front end.
-
4 Sep 2012 9:10 AM #16
is there an example how to implement relative urls?
-
4 Sep 2012 11:28 AM #17
Aaron Conran
@aconran
Sencha Architect Development Team
-
4 Sep 2012 11:39 AM #18
Thx, but this example didn't receive the json from a (different) webserver.
Ask as a "non-Webdev-guy": Is there a chance to get Data from different domains? Or is
it generally impossible to do that?
-
4 Sep 2012 11:45 AM #19
http://en.wikipedia.org/wiki/Same_origin_policy
The most common way of sharing resources cross domain is via JsonP. There is also the CORS (Cross-Origin Resource Sharing) spec which works in modern browsers.Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote