In my java code i create a List of A , and then add one instance of A to the list.
I am passing this list to the freemarker template and my template code is as follows:
<#if listA.size()!=0>
<#list listA as A>
${A.getA()}
</#list>
<#else>
nothign
</#if>
The error that I get is
freemarker.template.TemplateException: Expected hash. listC evaluated instead to freemarker.template.SimpleSequence on line 1, column 3 in null.
I am nt sure why is it saying anything about null? What is wrong, kindly help.
I found the problem, and here is the question.
apparently it does not understand the syntax of size method.
Freemarker assign list length to local variable