简体   繁体   English

哪些小部件约束对Grails域类有效?

[英]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), eg: 您能告诉我以下小部件约束的有效值列表吗(some-widget),例如:

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? 相关,您是否知道可以直接使用此约束的任何插件?

You can have a look there 你可以在那里看看

It's an old list, but it's still valid, I think 我认为这是一个旧列表,但仍然有效

From what I can tell, the widget property is only used for scaffolding and is referenced in the renderEditor.template . 据我所知, widget属性仅用于脚手架,并在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. 在该文件中,widget属性似乎有一些非常狭窄的用途,具体取决于您要搭建的对象的类型。

The good news, however, is that you can supply your own renderEditor.template file and edit it to work however you want. 不过,好消息是,您可以提供自己的renderEditor.template文件,然后对其进行编辑以使其可以工作。 Just create a file at ${basedir}/src/templates/scaffolding/renderEditor.template and Grails will pick it up when you generate the views. 只需在${basedir}/src/templates/scaffolding/renderEditor.template创建一个文件,Grails就会在生成视图时将其选中。

(See DefaultGrailsTemplateGenerator for more information.) (有关更多信息,请参见DefaultGrailsTemplateGenerator 。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM