【发布时间】:2015-01-07 00:12:02
【问题描述】:
我有一个带有输入字段的表单(示例已简化):
<input type="text" value="${model.person.age}">
这是按预期工作的,现在我想为此编写一个宏:
<#macro input path inputType="text">
<input type="${inputType}" value="${model[path]}">
</#macro>
可以和
一起使用 <@lib.input "person.age" />
我找到了 ${model[path]} 解决方案here,但它不适用于我的情况。我正在使用 Freemarker 2.3.21 和 Spring MVC 4.1.0。
【问题讨论】:
标签: freemarker