AnsweredAssumed Answered

How to get version label

Question asked by sumantapakira on Jul 13, 2013
Latest reply on Jul 16, 2013 by scouil
My webscript returns list of documents from a space called Folder A. Then I have to display those documents in ftl. So for that I applied Versionalbe aspect to that Folder A by running rule from UI. Now when I login to Alfresco Explore then Version label is displaying. But when I'm trying to iterate in ftl then I'm getting error when calling this web script.

Code to iterate -


<tr>
<td><b>Version Lable</b></td><td>${child.marktng.properties["cm:versionLabel"]}</td>
</tr>


Error -
<code>
500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:   06130513 Wrapped Exception (with status template): 06132122 Error during processing of the template 'Expression child.marktng.properties["cm:versionLabel"] is undefined on line 20, column 36 in marktng.get.html.ftl.'. Please contact your system administrator.

Exception:   freemarker.core.InvalidReferenceException - Expression child.marktng.properties["cm:versionLabel"] is undefined on line 20, column 36 in marktng.get.html.ftl.

freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
freemarker.core.Expression.getStringValue(Expression.java:118)
freemarker.core.Expression.getStringValue(Expression.java:93)
freemarker.core.DollarVariable.accept(DollarVariable.java:76)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:428)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)

Outcomes