I'm newbie with Grails framwork. I have issue:
I have Domain is: "Country". And I wants to show list country in select tag by using g:select in Grails
1 England
2 Canada
3 Germany
Now, I wants set "Canada" is selected. Who can help me. Please!
Use the value attribute to set the selected item:
<g:select name="user.company.id"
from="${Company.list()}"
value="${user?.company.id}"
optionKey="id" />
Why not use g:countrySelect
tag? This will save One whole Domain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With