的第一篇文章的这个论坛...Grails <field type =“number”...>不工作......?
Grails的2.0.1 <字段类型=“数字”>似乎并不奏效开箱,但也许我的使用是不正确的,所以我在这里寻找健康检查。
下面是我的域实体领域:
Long locationId
static constraints = {
locationId(blank: false)
}
这里的产生_form.gsp在脚手架模板合成场:
<g:field type="number" name="locationId" required="" value="${fieldValue(bean: myEntityInstance, field: 'locationId')}"/>
但这里的结果在html,按“查看源代码”:
<input type="number" name="locationId" required="" value="" id="locationId" />
而我的问题是,窗体空白现有的价值根据:value =“”。 其他字段(所有字符串)正确填充。 Grails 2.0.1的“数字”gsp字段是否可以为其他人正常工作?
问候 罗布