Two Tier Navigation Default Tab

I have a two tier navigation strip and I put a line in the internalFrameOpened event to set the default tab (system.gui.getParentWindow(event).getComponentForPath('Root Container.Window Groups').selectedTab = "Overview") – so that when a client is closed and re-opened, it shows the tab that corresponds to the startup main window. If I don’t have this line, then a user could be on a different screen, close the window, and when they open the client again, it shows the ‘Overview’ window, but the selected tabs are whatever they had opened when they closed the client.

The issue is that I also have a login pop-up that uses the ‘switchUser’ function – which closes and re-opens the windows, and in doing so, causes the internalFrameOpened event to fire, setting the tab back to ‘Overview’ which I do not want.

So, I’d like to find a way to either not close/re-open the navigation window when the user is changed OR have the correct tab selected on client restart without using the ‘internalFrameOpened’ event.

Setting the property in the client startup script instead of the internalFrameActivated should do what you want. Since that won’t fire the second time.

That doesn’t work because the client startup script fires before the window opens.

Use a client tag and then write to it from the client startup script and from the script you use to switch users.

I was able to make it work using that – it was a little weird since I have a default view only user so I had to mess with the setConnectionMode to get it working. Thanks!

1 Like