|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.webapp.navigation.BreadcrumbActionsBean
@Name(value="breadcrumbActions") @Scope(value=STATELESS) @Install(precedence=10) public class BreadcrumbActionsBean
The new approach: keep all selected documents into a list. Add new document to the list each time a new document is selected, after rebuilding the path.
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 Summary | |
---|---|
BreadcrumbActionsBean()
|
Method Summary | |
---|---|
List<PathElement> |
getBackendPath()
Computes the current path by making calls to backend. |
String |
navigateToParent()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BreadcrumbActionsBean()
Method Detail |
---|
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
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |