Results 1 to 2 of 2

Thread: Preserve params with PullRefresh

  1. #1

    Default Preserve params with PullRefresh

    Hi,

    I have several Ext.List's inside a Ext.Carousel. The amount of Ext.List's is dynamic, and each Ext.List is showing different results.

    In my Ext.Carousel's initialize() method I have defined the following:

    Code:
    initialize: function() {
        var me = this;
    
        MyApp.events.forEach(function(event) {
            me.add({
                xtype: 'postList',
                eventId: event.id
            });
        });
    
        this.callParent();
    }
    MyApp.events is dynamic and it's structure looks like this:

    Code:
    [{id: 1, name: 'First event'}, {id: 2, name: 'Second event'}]
    In my Ext.List's initialize() method I have defined:

    Code:
    initialize: function() {
        var me = this;
    
        me.setMasked({xtype: 'loadmask', message: 'Loading...'});
    
        this.setStore(Ext.create('MyApp.store.Post').load({
            params: {
                event: me.config.eventId
            },
            callback : function(records, options, success) {
                 if (success) {
                     me.setMasked(false);
                 }
            }
        }));
    
        this.callParent();
    }
    This works like expected. But, when I use Ext.plugin.PullRefresh it seems to 'forget' the store params:

    Code:
    params: {
        event: me.config.eventId
    }
    Can anyone point me in the right direction?

    Thanks in advance.

  2. #2

    Default

    Solved. The proxy preserves the params.
    Code:
    store.getProxy().setExtraParam('event', me.config.eventId)

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
  •