AnsweredAssumed Answered

Problems with datetime in templates

Question asked by luizfrazao on Apr 2, 2008
Hi,

I have a custom content type with datetime property (acValidity).

And I created a template which bring back these properties of documents.
So, when any doc doesn't have a value for acValidity ( i think should be 'null'), I have a Exception and the templeate doesn't work.

the exception is:


Caused by: freemarker.core.InvalidReferenceException: Expression child.properties["ac:acValidez"] is undefined on line 72, column 26 in alfresco/templates/ac/infraestructura_ti.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:172)
        at freemarker.core.Environment.visit(Environment.java:351)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.Environment.process(Environment.java:176)
        at freemarker.template.Template.process(Template.java:232)
        at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:200)
        … 62 more

Outcomes