I would like to open a docked window when a certain main window is open. And then open a different docked window when an other main window is opened.
I have tried to do this with "InternalActions" on the specified pages, but this leaves me with an error.
Is there somehow to do this? My docked window is a top bar, that are present at all pages. Except one, where a different docked window much replace the top bar.
If you allways need a docked window but that window can change depending on the main window open, maybe you can just do the following:
On the window that you need a different docked window to accompany it, add the following script under the Vision Window-VisionWindowOpened event handler:
mainDockedWindow = 'Insert here the path to the window you must close'
differentDockedWindow = 'Path to the window you must open'
system.nav.closeWindow(mainDockedWindow)
system.nav.openWindow(differentDockedWindow)
On the same window, under the event handler called VisionWindowClosed, add the following script:
mainDockedWindow = 'Insert here the path to the window you must open'
differentDockedWindow = 'Path to the window you must close'
system.nav.closeWindow(differentDockedWindow)
system.nav.openWindow(mainDockedWindow)
So, every time you open the main window that needs a different docked window, this script will close your main docked window and open the different docked window, the one you need, then, when you close this main window, itâll just revert what the first script did.
You can also do the same by changing the scripts that open and close your main window.
I hope this is what youâre looking for.
This solution works one time. The correct docked window closes and opens when the certain pages are opened. But if I try to navigate trough some pages, and back to the certain page. It will not close the docked window and open the different docked windowâŚ
So it almost works Just need to having it working every time I navigate to and from it.
I am using âTap Stripâ with âSwap windowsâ for my main pages.
Maybe itâs a thing about the cache policy? You can try and change the event handler to InternalFrameActivated and InternalFrameClosed, or use this script on your Tab Strip:
if event.propertyName == 'selectedTab':
mainDockedWindow = ""
differentDockedWindow = ""
differentMainWindow = 'Path to the window that uses a diff. docked window'
if event.newValue == differentMainWindow:
system.nav.closeWindow(mainDockedWindow)
system.nav.openWindow(differentDockedWindow)
else:
system.nav.closeWindow(differentDockedWindow)
system.nav.openWindow(mainDockedWindow)