Spring 3 MVC 文档声明选项标签可以这样呈现:
<tr>
<td>Country:</td>
<td>
<form:select path="country">
<form:options items="${countryList}" itemValue="code" itemLabel="name"/>
</form:select>
</td>
</tr>
我将 FreeMarker 与 Spring MVC 一起使用,因此我将其解释为:
<tr>
<td>Place:</td>
<td>
<@form.select path="place">
<@form.options items="${places}" itemValue="id" itemLabel="name"/>
</@form.select>
</td>
</tr>
当我点击页面时,出现以下异常:
freemarker.core.NonStringException: Error on line 40, column 73 in event.ftl
Expecting a string, date or number here, Expression places is instead a freemarker.template.SimpleSequence
我应该在我的 FreeMarker 模板中使用什么来代替 ${places} 以便上述工作?
谢谢。