Switch selected navigation tree tab after action triggered

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

0 votes

1 answers

1838 views

ANSWER

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.
01/09/2012

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



hello,

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

Thierry

1 votes



Perfect, just what I need.

In fact, the key is that directoryTreeManager.setSelectedTreeName() doesn't store really the selected navTree. The selected one is stored under multiNavTreeManager#selectedNavigationTree (information from the core of the method multiNavTreeManager.setSelectedNavigationTree()).

01/13/2012