我正在尝试在传递 2 个变量的 grails gsp 中执行 findAllWhere:一个是属性,一个是我希望该属性相等的值。IE(作者:Mark Twain)我无法弄清楚语法,我收到的错误也无济于事。
${Application.findAllWhere((${group1}): ${group})}
Group1 是从控制器传递的变量,group 是来自 ag:each 的变量。这是错误。
Error 500:
Servlet: default
URI: /archetype/application/applicationPortfolio/GroupLangTechOwn
Exception Message: No signature of method:
C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp.$() is
applicable for argument types:
(C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp$_run_closure2_closure56_closure144) values: [C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp$_run_closure2_closure56_closure144@239dbdd6] Possible solutions: is(java.lang.Object), run(), run(), any(), use([Ljava.lang.Object;), any(groovy.lang.Closure)
Caused by: Error processing GroovyPageView: No signature of method: C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp.$() is applicable for argument types: (C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp$_run_closure2_closure56_closure144) values: [C__projects_Archetype_grails_app_views_application_applicationPortfolio_gsp$_run_closure2_closure56_closure144@239dbdd6] Possible solutions: is(java.lang.Object), run(), run(), any(), use([Ljava.lang.Object;), any(groovy.lang.Closure)
Class: applicationPortfolio.gsp
At Line: [631]
谢谢!