2
我在Grails中开发了一个简单的webflow(主要是为了试验使用webflows--对于这种情况有点矫枉过正)。在使用Serializable对象进行一些试验和磨难之后,我有时会这么做。第一次访问Grails Webflow错误
这里是第一次rub-我启动应用程序(运行程序)之后访问的Webflow,我得到这个异常:
2010-06-16 09:11:25,580 [http-8080-3] [ERROR] [org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver] No signature of method: groovy.lang.MissingMethodException.to() is applicable for argument types: (java.lang.String) values: [validate]
Possible solutions: is(java.lang.Object), any(), use([Ljava.lang.Object;), getAt(java.lang.String), with(groovy.lang.Closure), any(groovy.lang.Closure)
groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.to() is applicable for argument types: (java.lang.String) values: [validate]
Possible solutions: is(java.lang.Object), any(), use([Ljava.lang.Object;), getAt(java.lang.String), with(groovy.lang.Closure), any(groovy.lang.Closure)
at com.sbs.component.survey.SurveyDefinitionController.invokeMethod(SurveyDefinitionController.groovy)
at com.sbs.component.survey.SurveyDefinitionController$_closure3.doCall(SurveyDefinitionController.groovy:23)
如果我“触摸”控制器(做任何编辑,甚至如果只是添加一个空格)然后保存该文件,webflow就会开始工作......看起来有些东西没有连接起来,直到控制器重新加载至少一次。显然,这是一个非首发......任何想法是什么造成这种情况?
我在Mac OSX Java 1.6上使用Grails 1.3.1。
这里是一个Webflow的骨架:
def createSurveyFlow = {
select {
}.to("validate")
on("cancel").to("finish")
}
validate {
on("approve") {
}.to("finish")
on("disapprove").to("select")
on("cancel").to("finish")
}
finish {
action {
flash.message = "SurveyDefinition created"
}
redirect(controller:"surveyDefinition", action:"index")
}
}