I need to detect record-updates by different sources as stated here: Lightning Components: how to use events to detect record updates?
For this example, I'm using the standard Record Detail compo on a Flexipage.
I don't like it, but unfortunately the only viable approach seems to handle the force:refreshView seem to be the only way to detect updates. I handle them like like that:
Markup
<aura:handler event="force:refreshView" action="{!c.events}" />
Controller
events : function(cmp, evt, hlp){
console.log('HANDLER');
},
Result
Now 'HANDLER' appears exactly 4 times in my console per subscribing component I have on the Flexipage. Why that?
Expected
Each handler should get called once per subscribing component.
<force:recordView ... type="FULL"/>
which is firing exactly once. I put my custom compo and the Standard Record Detail above each other: using standard, I get 4x bombarding, using my, I receive just 1x hit (exactly as expected). That message-system is really driving me nuts - in general, not only this issue...