PDA

View Full Version : Capture bubbled events in controller



vietits
28 Jan 2012, 12:53 AM
This is an override that allows you to capture bubbled events in controller. Using this override with "bubble events with prefix (http://www.sencha.com/forum/showthread.php?176990-Bubble-events-with-prefix)" you can easy to capture desired events fired from child components at a higher level of their parent (that events can bubble to). It means that you can capture desired events at one parent place instead of at each component level.

This override works by overriding the Ext.app.EventBus to allows to capture both "fired" events and bubbled events in controllers.

Note: This is my solution for an question in Q&A ("Catching bubbled events in controller (http://www.sencha.com/forum/showthread.php?174921-Catching-bubbled-events-in-controllers/page2)"). I re-post it here for those who are interested in this solution easier to refer to.

Source code
31111