是的,从 2.4.xg:remoteFunction开始,grails 已弃用。
看到这个。http://docs.grails.org/2.4.1/ref/Tags/remoteFunction.html
不过,您始终可以使用如下所示的 javascript/jQuery ajax 函数,它的作用完全相同。
<g:javascript>
function callMyAjax(){
$.ajax({
url:'${g.createLink( controller:'yourcontroller', action:'youraction')}',
data:{
param1:param1,
param2:param2
}
});
}
</g:javascript>
<input type="button" onclick="callMyAjax()"/>
Run Code Online (Sandbox Code Playgroud)