Results 1 to 6 of 6

Thread: [PR 1] Ext.data.proxy.LocalStorage -> id

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,750
    Vote Rating
    128
      0  

    Default [PR 1] Ext.data.proxy.LocalStorage -> id

    hi team,

    in ST 1.x you can specify ids containing dots, like:

    Code:
    id : 'SC.LocalSettings'
    In ST 2 this throws the error:
    Uncaught Error: [ERROR][Ext.data.proxy.LocalStorage#getObservableId] Invalid unique id of 'SC.LocalSettings' for this object
    The problem is, that this error gives no clue why the id is not valid. In general it would be nice if ids can contain dots again.
    Best regards
    Tobias Uhlig

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    I remember n ST1 that IDs had to be int... Could be wrong but I remember seeing that
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,750
    Vote Rating
    128
      0  

    Default

    hi mitchell,

    maybe i did not make my point clear: i am not refering to the id inside of a model or the storeId, but to the id of the proxy. When using local storage this is important.

    see the following example which is valid in ST 1.x:

    Code:
    Ext.regModel('SC.model.Settings', {
        fields : [
            {name : 'email',     type : 'string'},
            {name : 'id',        type : 'int'},
            {name : 'password',  type : 'string'},
            {name : 'theme',     type : 'string'}
        ],
    
        proxy: {
            type : 'localstorage',
            id   : 'SC.LocalSettings'
        }
    
    });
    Best regards
    Tobias Uhlig

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Confirmed and reported

    Just a note, regModel has been deprecated, the way to do it now is:

    Code:
    Ext.define('ModelName', {
        extend : 'Ext.data.Model',
        fields : [....]
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,750
    Vote Rating
    128
      0  

    Default

    "see the following example which is valid in ST 1.x:"

    thx for putting it into jira!
    Best regards
    Tobias Uhlig

  6. #6
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    11
      0  

    Default

    This comes about because of some optimizations we've been making to Observable in relation to ComponentQuery. Although we never explicitly supported/did not support dots in a localstorage proxy id, I think this limitation is a price worth paying for the performance optimization so we'll probably explicitly not support ids with dots in going forward.

    I suggest you change those to use a dash instead (especially given that it's just a string and the dot has no special significance anyway)
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •