Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What widget constraints are valid for Grails domain classes?

Can you tell me the list of valid values for the widget constraint below (some-widget), e.g.:

static constraints = {
    someField(widget: 'some-widget')
} 

The documentation seems to be missing. Related, do you know of any plugins that can work directly with this constraint?

like image 777
Ray Avatar asked Sep 03 '11 20:09

Ray


2 Answers

You can have a look there

It's an old list, but it's still valid, I think

like image 141
Grooveek Avatar answered Sep 18 '22 21:09

Grooveek


From what I can tell, the widget property is only used for scaffolding and is referenced in the renderEditor.template. In that file, it appears that the widget property has some pretty narrow uses depending on the type of object you are scaffolding.

The good news, however, is that you can supply your own renderEditor.template file and edit it to work however you want. Just create a file at ${basedir}/src/templates/scaffolding/renderEditor.template and Grails will pick it up when you generate the views.

(See DefaultGrailsTemplateGenerator for more information.)

like image 31
seth.miller Avatar answered Sep 17 '22 21:09

seth.miller