|
|
|
Nope, this cannot work like this..
Because tabs try to display currentItem, the current Archived item must be assigned to currentItem. The ArchiveActionBean will hold the last version (HEAD) of the document. BreadCrumb will check if currentItem is last version or not. I mean, BreadCrumb can ask ArchiveActionBean if the currentItem is an archived version or not.
If we want to be able to navigate throught versions, we indeed need to put into currentItem/currentDocument a version of the document.
To make it as simple as possible and avoid too much impact on navigation infrastructure, we must consider the versions as children of a document. So when clicking on a version of the document : set the currentDocument to the version and consider the "live document" as it's parent. Impact should be : - breadcrumb : should be able to consider a document as parent of it's version - generate a specific display when the leaf node is a version - Right Management / Action service : should deny (for now) each tab that needs Write access (may be done automatically by Security system) - navigationContext : should provide a method for navigating to a given document version => this also meens adapting the URL pattern to be able to get a version parameter in addition of the DocumentRef |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- an action bean that will hold currentArchivedItem.
- a new category of actions, VIEW_ARCHIVED_ACTION_LIST, to register actions/tabs that should be displayed for an archived document
- xhtml page view_archived_document.xhtml; the version should be displayed next to the title; also add here a button to return to currentItem
- if currentArchivedItem is set, BreadCrumb should append " > Archived Versions > version " to the path (change the list of DocumentModels to a list of PathElements in BreadCrumb)
- if the user clicks on "Archived Versions" on the page, the currentItem is displayed with the History tab selected, so he can choose another version.