Archived Version label EL expression

How is an EL expression used to call an archived version of a document? Using #{document.uid.major_version} calls the current document's major version, but how do I call schema of previously archived documents. Like pulling an older version label or an old title of a document using the EL expression.

All the information is there when you view the archived version in the Archived Versions subtab.

Any ideas? Thank you!

0 votes

0 answers

858 views

ANSWER

You might retrieve it through the documentManager variable (the CoreSession object) using for instance the getDocumentWithVersion method.
12/03/2014

Here's the template that I am trying to use to make a custom tab:

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:nxu="http://nuxeo.org/nxweb/util" xmlns:nxh="http://nuxeo.org/nxweb/html" xmlns:nxd="http://nuxeo.org/nxweb/document"> <div id="document_versions"> <c:if test="#{nxd:hasPermission(currentDocument, 'ReadVersion') and currentDocument.versionable and !(currentDocument.version or currentDocument.proxy)}"> <h:panelGroup> <nxu:set var="selectedVersionList" value="#{versionList.entries}" cache="true"> <c:if test="#{not empty selectedVersionList}"> <h:form id="document_versions_form"> <h:dataTable var="versionItemSelection" value="#{selectedVersionList}" class="dataOutput" rowClasses="dataRowEven,dataRowOdd"> <h:column> <f:facet name="header" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="#{messages['Revision']}" /> </f:facet> <h:outputText value="#{versionItemSelection.data.description}" /> </h:column>

The "#{versionItemSelection.data.description}" part is where the version labels are, but I can only access them on the template output.

What I'm trying to achieve is to replace the classic version label, "0.1, 0.2, 1.0…" with my own custom schema for version label, I access it by using

{document.additionalinfo.revision}.

12/03/2014