将我的grails应用程序从grails 2.2.4升级到grails 2.3.1 test-app后,应用程序引导程序的构建失败,并显示以下错误消息:
Fatal error running tests: Method on class [de.javandry.minigolf.webapp.Role] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
Run Code Online (Sandbox Code Playgroud)
运行构建时--stacktrace --verbose我看到以下详细信息(stacktraces简化为IMHO相关行):
2013-10-25 22:56:27,876 [main] WARN util.DTDEntityResolver - recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
2013-10-25 22:56:28,674 [main] WARN hibernate.AbstractEhcacheRegionFactory - Couldn't find a specific ehcache configuration for cache named [de.javandry.minigolf.webapp.Role]; using defaults.
2013-10-25 …Run Code Online (Sandbox Code Playgroud) 我想测试一下,在我的页面中双击列表项会打开相应的项目进行编辑.
这是我的页面结构:
<ul class="list">
<li class="item" ondblclick="jQuery(this).find('.edit-button').click();">
...some content...
</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
我有定义使用创业板的项目下列创业板网页moduleList的ListItem模块:
class ListPage extends Page {
static content = {
items { moduleList ListItem, $("li.item") }
}
...
}
Run Code Online (Sandbox Code Playgroud)
在ListItem模块中,我想访问根li元素以触发双击它.
我怎样才能访问li中ListItem模块?
正确的jQuery选择器可能$(this)只是在模块中this指向模块实例而不是根元素.