Grails formRemote: specifying real url as parameter

走远了吗. 提交于 2019-12-13 04:45:27

问题


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: 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]

How do I specify a real URL in this field instead of a map with controller, action, etc... ?


回答1:


Have you tried using the createLink method inside the url attribute? For example <g:formRemote name="someName" url="${createLink(controller:'somescript', base:'https://somesite')}" >

or you could pass it this way: url="[controller:'somescript', base:'https://somesite.com']" Seems to work in my test app.



来源:https://stackoverflow.com/questions/2173644/grails-formremote-specifying-real-url-as-parameter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!