1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Belarus, Gomel
    Posts
    38
    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,384
    Vote Rating
    12
    AndreaCammarata will become famous soon enough AndreaCammarata will become famous soon enough

      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


  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      1  

    Default


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