Hybrid View

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    141
    Answers
    2
    Vote Rating
    0
    armandoxxx is on a distinguished road

      0  

    Default Answered: Different stores with different (so I thought) proxies WTF !?

    Answered: Different stores with different (so I thought) proxies WTF !?


    Hey guys ..

    Need a little explanation about proxies ...
    I've got a form with components that call same URL through it's storage proxies.
    The problem is with extra params ...
    In some cases I have to set extra parameters to a proxy .. and ALL proxies now have that same parameters !!!

    copy paste from debug window:
    Code:
    proxy from store 1:
    constructor {type: "ajax", url: "http://fukec:8080/kliping-admin/rest/extEntities/searchEntities", extraParams: Object, reader: constructor, hasListeners: HasListeners…}
    api: Object
    events: Object
    extraParams: Object
    language: "en"
    type: "5a0d42a3-da66-3452-a44a-e9b36100a44a"
    __proto__: Object
    hasListeners: HasListeners
    model: function constructor() {
    nocache: true
    reader: constructor
    type: "ajax"
    url: "http://fukec:8080/kliping-admin/rest/extEntities/searchEntities"
    writer: constructor
    __proto__: TemplateClass
    
    
    proxy from store 2:
    constructor {type: "ajax", url: "http://fukec:8080/kliping-admin/rest/extEntities/searchEntities", extraParams: Object, reader: constructor, hasListeners: HasListeners…}
    api: Object
    events: Object
    extraParams: Object
    language: "en"
    type: "5a0d42a3-da66-3452-a44a-e9b36100a44a"
    __proto__: Object
    hasListeners: HasListeners
    model: function constructor() {
    nocache: true
    reader: constructor
    type: "ajax"
    url: "http://fukec:8080/kliping-admin/rest/extEntities/searchEntities"
    writer: constructor
    __proto__: TemplateClass

    check the type extra parameter .. it's in both proxies ... and I only set it once on second proxy!

    Any explanation and/or fix would be appreciated!

    Regards

    Armando

  2. Hey

    Yes I use two different stores..

    Ext.create('store1', {storeId:'store1'});
    Ext.create('store2', {storeId:'store2'});

    is the code .. and console throws 2 different stores out ..

    but I found out what was the problem ...

    old code:
    PHP Code:
    Ext.require('model.NamedEntity'); 
    Ext.define('store.NamedEntity', {
        
    extend        'Ext.data.Store',
        
    model        'model.NamedEntity',
        
    autoLoad    false,
        
    pageSize    50,
        
    proxy        : {
            
    type        'ajax',
            
    url            FORM_SEARCH_ENTITIES_PATH,
            
    extraParams    : {
                
    language    Dict.getDefaultLanguage()
            },
            
    reader        : {
                
    type            'json',
                
    root            'data',
                
    totalProperty    'total'
            
    }
        }

    }); 
    new code :
    PHP Code:
    Ext.require('model.NamedEntity');


    Ext.define('store.NamedEntity', {

        
    extend        'Ext.data.Store',

        
    constructor : function(theConfig) {

            
    Ext.apply(this, {
                
    model        'model.NamedEntity',
                
    autoLoad    false,
                
    pageSize    50,
                
    proxy        : {
                    
    type        'ajax',
                    
    url            FORM_SEARCH_ENTITIES_PATH,
                    
    extraParams    : {
                        
    language    Dict.getDefaultLanguage()
                    },
                    
    reader        : {
                        
    type            'json',
                        
    root            'data',
                        
    totalProperty    'total'
                    
    }
                }
            });
            
    this.initConfig(theConfig);
            
    this.callParent(arguments);
        }
    }); 
    they shared properties on create !!!


    Regards

    Armando

  3. #2
    Sencha User Arg0n's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    122
    Answers
    12
    Vote Rating
    16
    Arg0n will become famous soon enough Arg0n will become famous soon enough

      0  

    Default


    It seems, that your proxies don't share the same parameters... your stores share the same proxies xD
    Do you really use 2 different stores?

  4. #3
    Sencha User
    Join Date
    Apr 2008
    Posts
    141
    Answers
    2
    Vote Rating
    0
    armandoxxx is on a distinguished road

      0  

    Default [SOLVED]

    [SOLVED]


    Hey

    Yes I use two different stores..

    Ext.create('store1', {storeId:'store1'});
    Ext.create('store2', {storeId:'store2'});

    is the code .. and console throws 2 different stores out ..

    but I found out what was the problem ...

    old code:
    PHP Code:
    Ext.require('model.NamedEntity'); 
    Ext.define('store.NamedEntity', {
        
    extend        'Ext.data.Store',
        
    model        'model.NamedEntity',
        
    autoLoad    false,
        
    pageSize    50,
        
    proxy        : {
            
    type        'ajax',
            
    url            FORM_SEARCH_ENTITIES_PATH,
            
    extraParams    : {
                
    language    Dict.getDefaultLanguage()
            },
            
    reader        : {
                
    type            'json',
                
    root            'data',
                
    totalProperty    'total'
            
    }
        }

    }); 
    new code :
    PHP Code:
    Ext.require('model.NamedEntity');


    Ext.define('store.NamedEntity', {

        
    extend        'Ext.data.Store',

        
    constructor : function(theConfig) {

            
    Ext.apply(this, {
                
    model        'model.NamedEntity',
                
    autoLoad    false,
                
    pageSize    50,
                
    proxy        : {
                    
    type        'ajax',
                    
    url            FORM_SEARCH_ENTITIES_PATH,
                    
    extraParams    : {
                        
    language    Dict.getDefaultLanguage()
                    },
                    
    reader        : {
                        
    type            'json',
                        
    root            'data',
                        
    totalProperty    'total'
                    
    }
                }
            });
            
    this.initConfig(theConfig);
            
    this.callParent(arguments);
        }
    }); 
    they shared properties on create !!!


    Regards

    Armando

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