Results 1 to 2 of 2

Thread: params on automatic buffered calls (ExtJS 4.2)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Feb 2011
    Vote Rating

    Default params on automatic buffered calls (ExtJS 4.2)

    Hi, I have a buffered grid in ExtJS 4.2 which is working fine. Code is shown below:

    title: 'MyGrid',
    closable: false,
    xtype: 'gridpanel',
    id: 'mygrid',
    store: {
    storeId: 'mystore',
    model: 'MyModel',
    buffered: true,
    pageSize: 20,
    purgePageCount: 0,
    trailingBufferZone: 20,
    leadingBufferZone: 20,
    scrollToLoadBuffer: 10,

    proxy: {
    type: 'ajax',
    url : '',
    reader: {
    type: 'json',
    root: 'job'
    totalProperty: 'count.count'

    Initial call is done dynamically like:
    Ext.getCmp('MyGrid').getStore().load({ params: { newParam: value} });
    where a new param 'newParam' is added to the call.

    The problem is that in automatic scrolling calls, successively done by EXT JS framework, this parameter 'newParam' is not longer passed. I would expect that successive calls would repeat the first one, but they just invoke the url specified in the proxy. Otherwise I would expect a known mechanism to modify params in these automatic calls.

    * What is the expected mechanism to include this dynamic parameter on automatic calls performed by the buffered mechanism?
    * Otherwise, where can I intercept the flow to add this 'newParam' for automatic scrolling calls?


  2. #2
    Sencha User
    Join Date
    Feb 2011
    Vote Rating


    Well, I have found a workaround by adding a beforeload listener to the store:

    listeners: {
    beforeload: function (store, operation, eOpts) {
    store.proxy.setExtraParam('newParam', '' + Ext.getCmp('myCombo').getValue());

    what I do not like is that call params are spread in 3 places:
    * the proxy URL,
    * the beforeload event and
    * the load() invocation.

    But, for the moment, it works. Any cleaner idea?

Tags for this Thread

Posting Permissions

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