如题,补充:
在add.html.vm模板中:
#foreach ($column in $table.LabeledColumns)
<div class="form-group">
<label for="${column.FieldName}" class="col-sm-2 control-label">${column.label}</label>
<div class="col-sm-8">
#if ($column.isBoolean())
<form:select path="${column.FieldName}" class="${column.ValidationFormClass}" placeholder="${column.Label}">
<form:option value="true">是</form:option>
<form:option value="false">否</form:option>
</form:select>
#else
<input type="text" id="${column.FieldName}" class="form-control" name="${column.FieldName}" data-parsley-required="true" placeholder="${column.label}">
#end
</div>
</div>
#end