Simo
Simo

Reputation: 728

G select with enum value

In my Domain i declared an enum and then i declared my class

package myApp

import java.util.Date;
// Sex for Male Female end Other
enum Sex {M,F,O}

Now i need to crate a g:select that contains all the possible value of the sex enum.

Upvotes: 0

Views: 356

Answers (1)

Dónal
Dónal

Reputation: 187369

<g:select name="sex" from="${myApp.Sex.values()}"/>

Upvotes: 1

Related Questions