Grails formRemote:将真实网址指定为参数 [英] Grails formRemote: specifying real url as parameter
问题描述
我正在尝试使用Grail formRemote标签.我这样使用它:
I'm trying to use the Grail formRemote tag. I'm using it like so:
<g:formRemote name="newRule" url="https://somesite/somescript">
但是,我不断收到错误消息:
However, I keep getting the error:
groovy.lang.MissingMethodException:方法的无签名:org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib.deepClone()适用于参数类型:(java.lang.String)值:[ https://somesite/somescript]
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib.deepClone() is applicable for argument types: (java.lang.String) values: [https://somesite/somescript]
如何在此字段中指定真实的URL,而不是包含控制器,操作等的地图?
How do I specify a real URL in this field instead of a map with controller, action, etc... ?
推荐答案
您是否尝试在url属性内使用createLink方法?例如<g:formRemote name="someName" url="${createLink(controller:'somescript', base:'https://somesite')}" >
Have you tried using the createLink method inside the url attribute? For example <g:formRemote name="someName" url="${createLink(controller:'somescript', base:'https://somesite')}" >
或者您可以通过这种方式传递它: url ="[controller:'somescript',base:' https://somesite.com ']"似乎可以正常工作在我的测试应用中.
or you could pass it this way: url="[controller:'somescript', base:'https://somesite.com']" Seems to work in my test app.
这篇关于Grails formRemote:将真实网址指定为参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!