For those looking to use URL as parameters to both the main view and a docked view simultaneously, I did the following. Please let me know if there is a more elegant way. There would be the potential for multiple tabs being open, each with different parameters, so I didn’t go the Session route.
- Build a landing page that will serve as the Primary View no matter what URL is used. I am using a blank screen for now.
- In the Page Configuration, Create a page pointing to the Primary View with the URL having parameters specified “/page/:plant/:line”
- Configure the docked view and set default parameters here if needed. Set a dockid and remember it for later. My docked view is a menu to navigate to different views.
- Modify the Primary View to have view parameters, matching those in the URL: plant and line for example
- Add an event script to the View bound to onStartup, to run “system.perspective.openDock(“sidebar”, params = {“dockedPlant”:self.params.plant,“dockedLine”:self.params.line})”
- Modify the Docked View to have the View parameters matching those that were called by the script: dockedPlant and dockedLine for example
On loading the URL, the parameters pass from the URL to the Primary View. On the primary view load, it pushes the parameters to the dock with the openDock() function. In my case, the preference is to have the page load with the docked view shown to remind the user to select a view, so this method works for me. The next step for me to try is to add a script on the main landing page that will navigate to a more specific view depending on the passed parameters from the URL.
This is all a bit convoluted to pass parameters to both the Primary View and the Docked View, but it seems to work, except for an issue with stale parameters that I reported here