1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    38
    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,084
    Answers
    112
    Vote Rating
    95
    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
    38
    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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi