1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    36
    Answers
    3
    Vote Rating
    0
    rnel is on a distinguished road

      0  

    Default Answered: illegal token in Ext.create

    Answered: illegal token in Ext.create


    hi,

    I have an illegal token exception for this code (using a Ex.create in an Ext.define statement):

    Code:
    store : Ext.create('Ext.dtp.pdw.stores.User', {
            storeId : 'usersStore',
            autoLoad : true,
            proxy : {
                type : 'ajax',
                url : 'users',
                model : 'Ext.dtp.pdw.models.User',
                reader : {
                    type : 'json',
                    root : 'users',
                    idProperty : 'id'
                },
                api : {
                    destroy : 'users/delete',
                    read : 'users',
                    update : 'users/update',
                    create : 'users/create'            
                }
                
            }
        }),
    i have that error right after adding the

    Code:
    proxy : {
                type : 'ajax',
                url : 'users',
                model : 'Ext.dtp.pdw.models.User',
                reader : {
                    type : 'json',
                    root : 'users',
                    idProperty : 'id'
                },
                api : {
                    destroy : 'users/delete',
                    read : 'users',
                    update : 'users/update',
                    create : 'users/create'            
                }
                
            }
    as property in the create statement, i ddin't have thet error before. So, guys, what's the matter ? thanks.

  2. No, it seems not, but thanks anyway, i've finally defined the proxy in the store class (my other ticket on the forum), and i works now.

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,064
    Answers
    110
    Vote Rating
    92
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    it could be because of the model config. The model config should be part of the store and not the proxy. try this:

    Code:
    store : Ext.create('Ext.dtp.pdw.stores.User', {
             storeId : 'usersStore',
             model : 'Ext.dtp.pdw.models.User',
             autoLoad : true,
             proxy : {
                 type : 'ajax',
                 url : 'users',
                 model : 'Ext.dtp.pdw.models.User',
                 reader : {
                     type : 'json',
                     root : 'users',
                     idProperty : 'id'
                 },
                 api : {
                     destroy : 'users/delete',
                     read : 'users',
                     update : 'users/update',
                     create : 'users/create'
                  }
               }
         }),
    Last edited by Farish; 2 Nov 2012 at 3:41 AM. Reason: correction

  4. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    36
    Answers
    3
    Vote Rating
    0
    rnel is on a distinguished road

      0  

    Default


    No, it seems not, but thanks anyway, i've finally defined the proxy in the store class (my other ticket on the forum), and i works now.

Thread Participants: 1

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