1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Belarus, Gomel
    Posts
    42
    Vote Rating
    -1
    dmitryfisko is an unknown quantity at this point

      0  

    Default How to set value localStorage["data"] for store in Sencha Architect?

    How to set value localStorage["data"] for store in Sencha Architect?


    Hi everybody.

    I can't set value localStorage["data"] for store in Sencha Architect. Instead, localStorage["data"] is taken in quotes:
    Code:
    Ext.define('MyApp.store.Statistics', {    extend: 'Ext.data.Store',
    
        config: {
            data: 'localStorage["data"]',
            storeId: 'Statistics',
            fields: [
                {
                    name: 'first_name'
                },
                {
                    name: 'last_name'
                }
            ]
        }
    });
    I need to 'localStorage["data"]' became localStorage["data"].
    Please help me do this.

    P.S. Sorry for my English.

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Moved the thread into the Sencha Architect forum.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,080
    Vote Rating
    113
    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

      1  

    Default


    Use an event handler and call store.loadData(localStorage.data);
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 2