Page Load Event - Mendix Forum

Page Load Event

14

There should be events for ‘Page Load ‘ action. On those events we should be able to call microflow or nanoflow.

These could be used for doing basic setups(like creating /deleting/modifying objects, calling REST APIS which are needed one time execution etc) . 

Use Case : In my case I need to read a value from browser session and need to store it in mendix entity. I can not do that in startup microflow as microflows are not allowed to call JavaScript Action (introduced in Mendix 8 released on 2nd May 2019 ).

asked
2 answers

I was looking for an option to execute microflows for responsvie web page events (like OnBeforeLoad, OnAfterLoad, perhaps even OnPageUnload, etc.). This can make for much richer experiences, as I can update object properties for the page context as well (such as using a temp context object to detect and set what parts of the page to hide, show, make editable, dynamic text, etc., or even just to load other data needed for the page). It prevents the need for having to call a MF just to open a page.  That way I can just show a page and it will take care of itself.

Created

Hi Rushikesh

For native platform there is a Native Events widgets, that you can use for page load event.

For web you can have a data view with a data source nanoflow or microflow that can be used, but might refresh more often than you want. 

Cheers, Andries

Created