In a couple places, I tried calling system.perspective.alterDock('notif', {'content': 'cover'}). It works, but whenever I navigate to another page, the dock config seems to reset to whatever was defined in the screenshot. (Aka the content setting gets changed back to push instead of cover)
It's the only dock on the bottom (there's 1 onDemand one on the left and 1 persistent one on the top)
I only modify that dock, the other 2 are immutable
An oddity I noticed when debugging it.
I had a binding bound to session.props.page.path that ran a script to call alterDock to set it to either cover or push mode. When I navigate to a page, I can see the dock very briefly reset to default settings before getting altered by the alterDock call again. However, if I click the link of the page I'm already on, thus the binding for the path never runs, the dock gets reset anyway (but doesn't go back to its intended position because the binding never runs)
Known issues aside, AlterDock is only intended to work for the current page. As you move from page to page in your session, you are loading a new page configuration which will replace your existing Docked Views with whatever is configured for the Page config you have loaded.
Yep, because you're loading a new (albeit same) Page configuration, which is replacing the old one. Since the value in page.path has not changed, the script will not be run again.
Note: session.props.page.path is not known to me - was this a miscommunication, or are you creating this property yourself and updating it somehow?
Sorry, it was just page.props.path on a component.
Also clicking the same link does give the expected behavior (its reloading the config for the dock defined in the page, not continuing to use the altered config)
Hi everyone, this issue has been resolved and you will now be able to modify multiple docks using system.perspective.alterDock without the last changes being reverted in 8.3.3.
What about having dock parameters/configurations persist when opening new pages with the same dock configuration? This thread is regarding that issue, not the topic of altering multiple docks at once.
My issue is very similar to @Michael_White’s. I have a simple button to show/autoHide the dock (among other configuration changes, including content, modal, handle…) using system.perspective.alterDock(). Default is autoHide. When clicking a link in the docked view to navigate to a new page (but with the same dock configuration in the page configuration → shared settings), the dock configuration resets to the default defined in the shared settings. I also don’t see an easy to way to use parameters to accomplish this. It would be great to have a checkbox in my dock configuration to have its configuration persist between pages.
Also, the documentation on this page is wrong, at least for the config → display parameter. The documentation states that the accepted parameters are push, cover, or auto, but in my logs, it is telling me the accepted parameters are visible, onDemand, or auto. Version 8.1.37.
The dock configuration is not “resetting”. You are opening a new page, which loads its own Docked View configuration. There is no session-wide docked view state registry, so when you open a new page, you get a new instance of docked views loaded up as they are configured in the Designer. This is primarily because Perspective is a single-page application.
I’ve reached out to the Docs team in order to get that corrected.