Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9074 in a recent build.
  1. #21
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    This is fixed on the other thread

  2. #22
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Location
    Stockholm, Sweden
    Posts
    550
    Vote Rating
    50
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough

      1  

    Default


    Quote Originally Posted by Animal View Post
    It's an application error to use the same store in multiple combos.
    Obviously, each will add its own filter, so you really can't do this.
    Sorry for asking a stupid question;
    in 4.1.3 I had three different combos in different forms all running with the same local ArrayStore containing a list of countries (and also three combos with US States). To avoid massive duplication of static array data and memory overhead - how should I do this in 4.2.0? Creating three different stores all containing the same 300+ countries and 50 states seems a bit... stupid, for lack of other words.

    Thanks,
    /Mattias

  3. #23
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The problem is filtering. If a combobox applies a filter because you typed "Gre", to find "Great Britain", then the store that it thinks it owns is filtered. And other comboboxes which use that store will see the data filtered according to that.

    Can you see this happening when you run your app?

  4. #24
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Location
    Stockholm, Sweden
    Posts
    550
    Vote Rating
    50
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough

      0  

    Default


    Quote Originally Posted by Animal View Post
    Can you see this happening when you run your app?
    Yep! So, what is the recommended approach to handle this?

    I have now duplicated the store three times for country and state so instead of 2 stores I have 6. Each store loaded with 5kB + 2kB data - there's got to be a better way!
    Last edited by tangix; 18 Mar 2013 at 8:02 AM. Reason: Added more info

  5. #25
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Possibly override onBlur and onFocus to remove and re-add the queryFilter back to the store.

    The idea being that only one item can be focused, so only one can apply a filter during the time it is focused.

    That's just a concept. I have not dug into the code to check whether it is that easy. I think we should probably do this to enable sharing though. I agree it is silly to have to create several identical stores.

  6. #26
    Sencha Premium Member
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    51
    Vote Rating
    3
    extjs@kingsquare.nl is on a distinguished road

      1  

    Default Same issue in Ext.data.AbstractStore

    Same issue in Ext.data.AbstractStore


    The same 'disabled-filters-still-change-behaviour' issue exists in Ext.data.AbstractStore : when using a combo with a remote store, clicking on the trigger will add an undesired 'filter' to the remote request. I patched this as follows (based on the Ext.data.Store.filter() patch )

    Code:
        Ext.override(Ext.data.AbstractStore, {
            load: function (options) {
                var me = this, operation, allDisabled = true, i, length;
        
                for (i = 0, length = me.filters.items.length; i < length; i += 1) {
                    if (me.filters.items[i].disabled === false) {
                        allDisabled = false;
                        break;
                    }
                }
                if (!allDisabled) {
                    options.filters = me.filters.items;
                }
                options = Ext.apply({
                    action: 'read',
                    sorters: me.getSorters()
                }, options);
                me.lastOptions = options;
        
                operation = new Ext.data.Operation(options);
        
                if (me.fireEvent('beforeload', me, operation) !== false) {
                    me.loading = true;
                    me.proxy.read(operation, me.onProxyLoad, me);
                }
        
                return me;
            }
        })

  7. #27
    Sencha User
    Join Date
    Feb 2010
    Posts
    353
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    Extjs 4.2.0.663

    Is it possible to disable the use of store filters in combobox queries ??

    If there is a config option in combobox, like "useStoreFilters: false", then whe can continue using the old source code from 4.1.1.a applications because the php side will continue use the "query" POST parameter, and don't be confused with new automatically added "filter".

    Could it be possible ?

    This implementation forces the use of displayField for the filter name, it would be better to config this "name", because if you have a customized combobox its a problem.
    For example in my php side code, i receive the "filter" post array, and i put all the properties names like WHERE's in my SQL query (checking somethings before), but i mean that it's an automatic bucle.

    If i could distinguish the "combobox query string" in some way it will be better than now.
    I upgraded from 4.1.1.a to extjs 4.2 and simply the application cannot be used because any combobox works.

    Code:
    // Create the filter that we will use during typing to filter the Store        
     // Add the filter once the displayField is finally set         
    me.queryFilter = new Ext.util.Filter({             
         id: me.id + '-query-filter',             
         disabled: true,             
         root: 'data',             
         property: me.displayField         
    });         
    store.filter(me.queryFilter);
    -------------------
    Manel Juàrez

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..."