Threaded View

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2008
    Vote Rating
    mastachef is on a distinguished road


    Default How to bubble events from Store (revisited)

    Hello everyone. I tried to do some research on how to bubble an event from the Store and I came across this thread from the EstJS 4 forum -

    With that, I tried to see if I can accomplish this in 3.2.1 and what I would to accomplish is to be able to bubble an event from the store after the records have been loaded.

    Here, I have extended the store with the event I need to fire after the records have been loaded.
    // Extension of the Store
    Ext.ux.GridAwareStore = Ext.extend
            constructor: function(config){
                Ext.ux.GridAwareStore.superclass.constructor.apply(this, arguments);
                this.reader.readRecords =      this.reader.readRecords.createSequence(this.verifyResponse, this);
            verifyResponse: function(o){
                console.log('got the load');
            loadData : function(o, append){
                this.fireEvent('actioncomplete', this);
            listeners: {
                storeloaded: function(r) {
    The issue on the Grid is that I am able to capture the event being fired from the Store only once (initial loading). After that, this section of code is never reached.
    // GridPanel overridden
    Ext.override(Ext.grid.GridPanel, {
        bubbleEvents: ['actioncomplete'],
        initComponent: Ext.grid.GridPanel.prototype.initComponent.createSequence(function() {
                this.addListener('actioncomplete', function() {}, this);
                console.log('the grid has it');
    The questions I have are how does one maintain passing the Store's data while bubbling the event and why is my listener only capturing the event once.

    Any help is greatly appreciated. Thank you.
    Last edited by mastachef; 3 Mar 2012 at 5:30 AM. Reason: clearer explaination

Thread Participants: 1

Tags for this Thread