@Name(value="breadcrumbActions") @Scope(value=STATELESS) @Install(precedence=10) public class BreadcrumbActionsBean extends Object implements BreadcrumbActions
Algorithm for rebuilding the path:
d1 -> d2 -> d3 -> d4
A new document is selected, which is a child of d2, named d2.5. We need to add d2.5 to the list after all unneeded documents have been removed to the list. In the end the list should look like this: d1 -> d2 -> d2.5. We need to remove all the documents in the list after d2, and add d2.5 to the list. TODO: fix bug when selecting an item located on a different branch than the current one so that its parent is not found in the current branch
Constructor and Description |
---|
BreadcrumbActionsBean() |
Modifier and Type | Method and Description |
---|---|
List<PathElement> |
getBackendPath()
Computes the current path by making calls to backend.
|
String |
navigateToParent() |
public String navigateToParent() throws ClientException
navigateToParent
in interface BreadcrumbActions
ClientException
@Factory(value="backendPath", scope=EVENT) public List<PathElement> getBackendPath() throws ClientException
GR: removed the Factory annotation because it made the method be called too early in case of processing that involves changing the current document. Multiple invocation of this method is anyway very cheap.
getBackendPath
in interface BreadcrumbActions
ClientException
Copyright © 2011 Nuxeo SA. All Rights Reserved.