1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    673
    Vote Rating
    9
    Dumbledore will become famous soon enough

      0  

    Default [4.2.1 744] treestore load params

    [4.2.1 744] treestore load params


    Hi!

    whats wrong on this code?

    Code:
            // store is a treestore
            store.load({
                params : {
                    cache_bypass : e.shiftKey
                },
                callback : function(records, operation, success){
                    console.warn(operation);
                }
            })
    the param cache_bypass will not send!?

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,343
    Vote Rating
    197
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    cache_bypass is not sent or the value is not sent with it?

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    673
    Vote Rating
    9
    Dumbledore will become famous soon enough

      0  

    Default


    cache_bypass will be sent, because it is defined in the stores prxy definition:

    Code:
            type    : 'rest',
            url     : 'nws/',
            extraParams : {
                cache_bypass : false
            },
            reader  : {
                type            : 'json',
                root            : 'data',
                totalProperty   : 'total'
            }
        }
    i thought that the value will be overwritten when i load a store via:

    Code:
            store.load({
                params : {
                    cache_bypass : e.shiftKey
                }
            })

    currently i use following workaround:

    Code:
            store.proxy.extraParams = {
                cache_bypass : e.shiftKey
            };
    
            store.load({
                params : {
                    cache_bypass : e.shiftKey
                }
            })

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,343
    Vote Rating
    197
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Ok. You can also use setExtraParams()
    http://docs.sencha.com/extjs/4.2.1/#...-setExtraParam
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 1