1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    0
    Djeezy is on a distinguished road

      0  

    Default Unanswered: Setting UUID strategy throw me an error

    Unanswered: Setting UUID strategy throw me an error


    (this is a duplicate of Stackoverflow's topic).

    Hello everyone,

    after a lot of googling and debugging, I can't figure it out why I get an error when using UUID strategy in my Model instance.
    I am using localStorage to store remote data on the user's device, ST2 recommands (they says "you need") to use an UUID identifier in my model instance to generate unique ID.If I don't, I get :


    Code:
    [WARN][Anonymous] Your identifier generation strategy for the model does not ensure unique id's. Please use the UUID strategy, or implement your own identifier strategy with the flag isUnique.
    If I do it, I get



    Code:
    Uncaught TypeError: Cannot call method 'substring' of undefined
    Here is my Model :

    Code:
    Ext.define("MyApp.model.News", {
        extend: 'Ext.data.Model',
    
        config : {
            idProperty: "localId",
            identifier: {
                type: 'uuid'
            },
            fields : [ {
                name: "localId",
                type: "auto"
            },{
                name : "id",
                type : "integer"
            }, {
                name : "title",
                type : "string"
            }[...]],
            proxy: {
                type: 'localstorage',
                id  : 'proxyNews'
            }
    
        }
    });
    And the localStorage store :

    Code:
    Ext.define('MyApp.store.NewsLocalStorage', {
        extend: "Ext.data.Store",
        config: {
            storeId: 'newsLocalStorage',
            model: "Lmde.model.News",
            autoLoad: true
        }
    });
    What am I missing ?

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    0
    Djeezy is on a distinguished road

      0  

    Default


    Anyone ?

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar