Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webapp.navigation
Class BreadcrumbActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.webapp.navigation.BreadcrumbActionsBean
All Implemented Interfaces:
BreadcrumbActions

@Name(value="breadcrumbActions")
@Scope(value=STATELESS)
@Install(precedence=10)
public class BreadcrumbActionsBean
extends java.lang.Object
implements BreadcrumbActions

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

Author:
Razvan Caraghin

Constructor Summary
BreadcrumbActionsBean()
           
 
Method Summary
 java.util.List<PathElement> getBackendPath()
          Computes the current path by making calls to backend.
 java.lang.String navigateToParent()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadcrumbActionsBean

public BreadcrumbActionsBean()
Method Detail

navigateToParent

public java.lang.String navigateToParent()
                                  throws ClientException
Specified by:
navigateToParent in interface BreadcrumbActions
Throws:
ClientException

getBackendPath

@Factory(value="backendPath",
         scope=EVENT)
public java.util.List<PathElement> getBackendPath()
                                           throws ClientException
Computes the current path by making calls to backend. TODO: need to change to compute the path from the seam context state.

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.

Specified by:
getBackendPath in interface BreadcrumbActions
Returns:
Throws:
ClientException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.