The moose likes Groovy and the fly likes How to do enums in Groovy/Grails? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "How to do enums in Groovy/Grails?" Watch "How to do enums in Groovy/Grails?" New topic
Author

How to do enums in Groovy/Grails?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 332
I'm trying to learn groovy/grails and I tried the grails tutorial in the last chapter of GinA and I was impressed.

I did a google search for enum groovy and it appears that groovy does not implement enumes. However, java6 and hibernate do!

How can I coerce grails into generating the scaffolding (radio buttons or drop-down list box) for an enum for me?

Thanks,
Siegfried
Josh Brown
Ranch Hand

Joined: Oct 09, 2007
Posts: 35
Groovy actually supports enums now, in version 1.1-rc-1. It seems like there are still some bugs to work out (as I discovered in a limited amount of toying around), but the support for enums is there. You can read about the recent release here:

Groovy 1.1-rc-1 released


Josh
Inside the Machine
 
 
subject: How to do enums in Groovy/Grails?
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com