Results 1 to 4 of 4

Thread: [4.2.1 744] treestore load params

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    720
    Vote Rating
    36
      0  

    Default [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
    6,154
    Vote Rating
    247
      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
    720
    Vote Rating
    36
      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
    6,154
    Vote Rating
    247
      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 human resources manager: fabienne.bell@sencha.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •