How to make widget on the Layout to refresh/reload ?

0
i have a notificaion icon on the layout which shows the number of notifications, after doing the transaction by the user, the count on the notification icon should be changed. while transaction is executing , the commit operation is also happening with refreshing the client but the icon on the layout is not getting refreshed.
asked
1 answers
0

Since the layout acts as a global wrapper and is not automatically invalidated by inner page commits or refreshes, the notification counter should be treated as session/global state rather than page state.


“Refresh in client” only updates widgets that directly use the committed object. If the layout badge is not bound to that same object context, it will not refresh automatically.


As a solution, I recommend using the Events widget from the Mendix Marketplace:

https://marketplace.mendix.com/link/component/224259


Recommended approach


  1. Place the Events widget inside the layout or the snippet where the notification badge is located.
  2. Configure the event type as Component loads.
  3. Enable the Execute repeatedly / Interval option (polling mode).
  4. Set a reasonable interval (e.g., 10–30 seconds).
  5. Trigger your MF_GetNotificationCount microflow.
  6. Store the result in a helper object (preferably non-persistent) and refresh it in the client if needed.


This ensures that the notification count remains up to date regardless of which page the user is currently viewing.


If this resolves the issue, please close the topic.


answered