Threaded 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

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