cancel
Showing results for 
Search instead for 
Did you mean: 

Switch selected navigation tree tab after action triggered

PomCompot_
Confirmed Champ
Confirmed Champ

Hi,

We have added a new type of document list (documentslists-contrib.xml) to give users the ability to bookmark documents. It is displayed at the bottom of the navigation tree, aside others document lists (selection and clipboard).

I have successfully put this document list in the top tab group, as a navigationTree, to give a better accessibility. Now, I would like to get the same behavior than before: my tab automatically selected when I add a document to this list, like when it was a bottom tab.

Looking at the code, I saw that a Events.instance().raiseEvent(listName + "Updated"); is fired when a document is added to a list. But I haven't found a way to listen to this event.

Moreover, I don't know how to select a navigation tree tab after an action has finished. I have tried directoryTreeManager.setSelectedTreeName("bookmarks"); at the end of my action without success.

To sum up, I would like to select the right tab in navigation tree either by listening at the event raised by DocumentListManager or by calling a method after my action has executed to set the current selected navigation tree.

Thanks.

Stéphane

1 ACCEPTED ANSWER

Thierry_Martins
Star Collaborator
Star Collaborator

hello,

you can use multiNavTreeManager.setSelectedNavigationTree("bookmarks"), as multiNavTreeManager.selectedNavigationTree is the value checked to select a tab in the navigation tree

Thierry

View answer in original post

4 REPLIES 4

Wojciech_Sulejm
Star Contributor
Star Contributor

It is not very clear what question you are asking? Selecting the navigation tree tab or listening to a specific event? Please reformulate your question so that it is more clear. If you wanted to ask both, please split your question into two questions with more meaningful headings so that they can be helpful for other users => your current heading seems to imply that what you are interested in is how to create/display a documentlist as navigation tree, which apparently is what you already achieved.

PomCompot_
Confirmed Champ
Confirmed Champ

Thanks for you feedback. I have updated my question and its title to make it clearer. Hope it would be better.

Thierry_Martins
Star Collaborator
Star Collaborator

hello,

you can use multiNavTreeManager.setSelectedNavigationTree("bookmarks"), as multiNavTreeManager.selectedNavigationTree is the value checked to select a tab in the navigation tree

Thierry

Perfect, just what I need.