How to notify custom widget on a mendix modeller button click

0
Hi, I have a button in a page added in mendix modeller. I want to notify a custom widget on button click. Please guide how to achieve it.    
asked
2 answers
0

Easiest way is to add a specific class to the button in the modeler. 

Get the button in your widget by targeting this class with plain JavaScript with document.getElementsByClassName.

Now add an event listener to the on click event of this button in javascript with something like addEventListener.

Good luck!

answered
0

If you know the microflow changes/refreshes some objects, in your widget, you can subscribe to those object so your widget will be notice when the microflow triggered.

answered