Grails脚手架坏了

发布于 2024-09-03 20:48:51 字数 1363 浏览 6 评论 0原文

Grails脚手架在我的grails应用程序中不起作用。 当我从主页转到特定控制器页面时,它输出如下内容:

Error 500:
Servlet: default
URI: /myapp/myDomain/list
Exception Message: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /webTestDummyDomain/list:25
Caused by: Error processing GroovyPageView: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /myDomain/list:25
Class: /myDomain/list
At Line: [25]
Code Snippet:

代码片段为空。如果我尝试创建一个新的应用程序脚手架,效果会很完美。

附加数据:

Application Status

    * App version: 0.1
    * Grails version: 1.2.2
    * JVM version: 1.6.0_20
    * Controllers: 11
    * Domains: 10
    * Services: 19
    * Tag Libraries: 26

Installed Plugins

    * i18n - 1.2.2
    * filters - 1.2.2
    * logging - 1.2.2
    * core - 1.2.2
    * tomcat - 1.2.2
    * webtest - 2.0.4
    * functionalTest - 1.2.7
    * yui - 2.7.0.1
    * rest - 0.3
    * jquery - 1.4.2.1
    * bubbling - 2.1.2
    * urlMappings - 1.2.2
    * groovyPages - 1.2.2
    * servlets - 1.2.2
    * dataSource - 1.2.2
    * controllers - 1.2.2
    * codecs - 1.2.2
    * jqueryUi - 1.8-SNAPSHOT
    * grailsUi - 1.2-SNAPSHOT
    * domainClass - 1.2.2
    * mimeTypes - 1.2.2
    * scaffolding - 1.2.2
    * converters - 1.2.2
    * hibernate - 1.2.2
* validation - 1.2.2
* services - 1.2.2

您能给我任何指示吗?

Grails scaffoldin does not work in my grails application.
When I go from the main page to the specific controller page it output something like this:

Error 500:
Servlet: default
URI: /myapp/myDomain/list
Exception Message: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /webTestDummyDomain/list:25
Caused by: Error processing GroovyPageView: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /myDomain/list:25
Class: /myDomain/list
At Line: [25]
Code Snippet:

Code snippet empty. If I try to create a new app scaffold works perfectly.

Additional data:

Application Status

    * App version: 0.1
    * Grails version: 1.2.2
    * JVM version: 1.6.0_20
    * Controllers: 11
    * Domains: 10
    * Services: 19
    * Tag Libraries: 26

Installed Plugins

    * i18n - 1.2.2
    * filters - 1.2.2
    * logging - 1.2.2
    * core - 1.2.2
    * tomcat - 1.2.2
    * webtest - 2.0.4
    * functionalTest - 1.2.7
    * yui - 2.7.0.1
    * rest - 0.3
    * jquery - 1.4.2.1
    * bubbling - 2.1.2
    * urlMappings - 1.2.2
    * groovyPages - 1.2.2
    * servlets - 1.2.2
    * dataSource - 1.2.2
    * controllers - 1.2.2
    * codecs - 1.2.2
    * jqueryUi - 1.8-SNAPSHOT
    * grailsUi - 1.2-SNAPSHOT
    * domainClass - 1.2.2
    * mimeTypes - 1.2.2
    * scaffolding - 1.2.2
    * converters - 1.2.2
    * hibernate - 1.2.2
* validation - 1.2.2
* services - 1.2.2

Can you give me any pointer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橘寄 2024-09-10 20:48:51

听起来可能有些东西被重命名了,并且控制器和视图之间的映射被破坏了。

您可以尝试创建一个新的域类,然后创建一个新的控制器吗?完成此操作后,请尝试在运行应用程序后进入新的控制器页面。

Sounds like maybe something got renamed and the mapping between the controller and view is wacked.

Can you try creating a new domain class and then a new controller. Once you do that, try to go to the new controller page after you run-app.

慈悲佛祖 2024-09-10 20:48:51

我知道发生了什么事。我有一个标签库,没有名称空间重新定义,并且有一个名为“message”的闭包。该闭包正在运行,而不是 i18n 函数“message”,因此它没有输出任何内容。由grails脚手架生成的名为“sortable”的标签需要一个需要i18​​n函数输出的属性。

下次我必须尝试使用​​ grails 参考中没有出现的名称来命名我的函数。

不过还是感谢@Steven的回答。

I found out what happened. I had a taglib without namespace redefinition and with a closure named "message". And that closure was running instead i18n function "message" so it didn't output nothing. And the tag generated by grails scaffolding named "sortable" it need a attribute that need the output of the i18n function.

For the next time I have to try to name my functions with names that doesn't appear in the grails reference.

Thanks @Steven for your answer though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文