Active Menu Tab

I would like to change my default Mendix Active Menu Tab without click on the menu but set it active on page load/in a microflow.
3 answers

My read of this question is a little bit different than Simon's. The Mendix built-in menus don't show an "Active" page/tab/option when you open the page from some other source - like a button or the default home page.

I had to work around this issue on a mobile device - I used the HTMLSnippet widget on my page to put some Javascript in place:

window.setMenu = function() {
    if (dijit.registry.byClass("mxui.widget.MenuBar").length > 0) {
        dijit.registry.byClass("mxui.widget.MenuBar").forEach(function(m) {
            m._currentSelection = 4;
    } else {
        setTimeout(window.setMenu, 250);


This code might be specific to the mobile menu bar, but I'm sure it could be modified to work with the desktop menu as well. The idea is that this code runs when the page loads, and runs every .25 seconds until it finds a specific menu bar item (in this example the 5th one), and then adds the "active" class to it.


You probably looking for something like this then:


I would say use my TabSwitcher-widget indeed. You can add a microflow giving an integer output to set the active tab pane of the tab container.