2017-08-10 58 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