2017-08-10 53 views

回答

4

您可以通过访问列表:

YourClass.getConstrainedProperties().yourProperty.inList 

您可以在g:each循环中使用此选项来创建您的选择选项或使用g:select标签,因为:<g:select from="${YourClass.getConstrainedProperties().yourProperty.inList}" />

+1

Thanks @Joshua Moore用于添加g:select标签作为替代解决方案,而不是使用g:each。绝对是更好的方式和走的路! – Kloker