1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default Sync ajax store to offline site

    Sync ajax store to offline site


    Hello I am trying to sync my ajax store to my localStorage. I can see that the key gets set but I can't load any data.

    Code:
            onLaunch: function() {
                languageStore = this.getLanguageStoreStore();
                
                languageStore.load({
                    scope   : this,
                    callback: function(records, operation, success) {               
                         var newPunchStore = Ext.create('Ext.data.Store', {
                                     model: 'myApp.model.LanguageModel',
                                     storeId: 'myOffline',
                                        proxy: {
                                                type: 'localstorage',
                                                id: 'hopethisworks',
                                                reader: {
                                                    root: 'data',
                                                    idProperty: 'ID',
                                                    successProperty: 'result',
                                                }
                                            }
                                     });
                                     
                                     
                        newPunchStore.load(languageStore);
                        newPunchStore.sync();
                         
                         
                         
                    }
    
              })
            },

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default PR2 bugs???

    PR2 bugs???


    Ok, I just tried the exact example from:

    http://docs.sencha.com/touch/2-0/#!/...y.LocalStorage

    and I'm getting the same results. Wondering if PR2 has issues with this?

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Yup, sorry. There is a bug for this already opening for PR2. It will be fixed before GA.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

Tags for this Thread