AnsweredAssumed Answered

Track another widget's events

Question asked by on Nov 10, 2015
Latest reply on Apr 29, 2018 by sumathy_aaCofm

Still fairly new to WAB, and dojo on the whole, so perhaps this has a simple answer.


Take, for example, the out-of-the-box version 1.2 Search widget. Inside its .js file is the following few lines:



                on(this.searchDijit, 'select-result', lang.hitch(this, '_onSelectResult'))



I'm wondering if there's away to hitch on to this exact same event from another custom non-panel widget. The desired behavior is that whenever the out-of-the-box Search widget's searchDigit fires its 'select-result' event, this other custom widget can perform an action as well, using the same argument object that is passed to the local Search's event handler.


I'm trying to avoid modifying the out-of-the-box Search widget's code, as it seems pretty tightly coupled to the WAB layout. Though if there are any best practices for this latter approach, I'm open to those as well.