1. #11
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
    UR-IT is on a distinguished road

      0  

    Default 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

  2. #12
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Set the autoLoad configuration to true.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #13
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
    UR-IT is on a distinguished road

      0  

    Default


    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

  4. #14
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    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

  5. #15
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    17
    Vote Rating
    0
    cweirich is on a distinguished road

      0  

    Default


    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.

  6. #16
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
    UR-IT is on a distinguished road

      0  

    Default


    is there an example how to implement relative urls?

  7. #17
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by UR-IT View Post
    is there an example how to implement relative urls?
    http://docs.sencha.com/architect/2/#...st_desktop_app
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #18
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
    UR-IT is on a distinguished road

      0  

    Default


    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?

  9. #19
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by UR-IT View Post
    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?
    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

Thread Participants: 4

Tags for this Thread