Reputation: 47290
this works fine:
<#list myObjects as myObject>
<tr>
<td>${myObject.person.surname}</td>
<td>${myObject.myListOfCountries[0].city.name}</td>
</tr>
</#list>
However if I instead try to create a nested list like so, which does not work :
<#list myObjects as myObject>
<tr>
<td>${myObject.person.surname}</td>
<#list myObject.myListOfCountries as item>
<td>${item.city.name</td>
</#list>
</tr>
</#list>
the error I receive is shown below :
freemarker.core.ParseException: Encountered "/"
Any ideas what causes the error - are nested lists allowed in freemarker ?
Upvotes: 7
Views: 13435
Reputation: 274612
You haven't closed your brace. It should be:
<td>${item.city.name}</td>
Upvotes: 11