访问视图[Grails]中的inList值
我想访问在我的视图中在域中设置的inList值。像这样:访问视图[Grails]中的inList值,grails,Grails,我想访问在我的视图中在域中设置的inList值。像这样: <g:countrySelect name="SelectState" keys="${incidentInstance?.state.toList()}" value="${incidentInstance?.state}"/> 但它不起作用…(有什么想法?) Thx好吧,您使用的是而不是 要获取inList值(从约束定义中),可以执行以下操作 <g:select name="state" from="${inc
<g:countrySelect name="SelectState" keys="${incidentInstance?.state.toList()}" value="${incidentInstance?.state}"/>
但它不起作用…(有什么想法?)
Thx好吧,您使用的是
而不是
要获取inList值(从约束定义中),可以执行以下操作
<g:select name="state" from="${incidentInstance.constraints.state.inList}"
value="${incidentInstance?.state}"/>
好吧,您使用的是
而不是
要获取inList值(从约束定义中),可以执行以下操作
<g:select name="state" from="${incidentInstance.constraints.state.inList}"
value="${incidentInstance?.state}"/>