I have a perspective page with a header and a docked menu tree on the left side of the page. Underneath the header and to the right of the menu tree is a flex container with an embedded view, which is what the homepage URL brings up. I'd like to populate the path property in the embedded view based on the selection that's made in the docked menu tree, rather than redirecting the user to a different page. Is this possible?
Message handlers could be useful here. Configure the message handler on the embedded view to set the embedded views path property, and have the menu tree send the selected path using
system.perspective.sendMessage onItemClicked. Seems like
event contains all the info about which item was clicked, you would just need to associate that to the path somehow.
If the menu tree doesn't allow to navigate to a view instead of a page, I'm pretty sure you could use a navigation action from an event.
Is there only the embedded view in your main page, or are there other elements that don't change when navigating with the menu tree ?
Yes, this is what I'm trying to do. There isn't, however, a selected property visible in the property editor for the menu tree.
I noticed that there's a warning message printed to the output console when I click on an item that doesn't have a path assigned to it. If there's a way to get set a variable to this message, then I could get the item name from there. I know that this message is written to the gateway Logger object, or something to that effect, but I'm not sure how to capture the message as system.util.getLogger() apparently only has methods for writing logs - not reading logs.
I found that if the header and docked view settings are the same on the main view and the page that I want to navigate to, then the Perspective loading page doesn't show up. My main issue was that the "Loading Project" page would show up between pages.
Marking this as resolved.
Why wasn't the main issue ever mentioned before ? That seems kind of relevant.