grails RemoteFunction onComplete,传递事件?漏洞?

发布于 2024-12-10 11:14:51 字数 603 浏览 1 评论 0原文

根据 remoteFunction 文档,可以调用 JavaScript 函数当remoteFunction完成时,使用onComplete参数。从我在网上看到的示例来看,可以提供一个带有事件参数的函数,即

 onComplete: 'finishUp(e)'

然后我发现这在 1.3.6 中被破坏了,根据 Grails 错误提交,此处此处,根据错误解决方案,该问题应该在 1.3.7(可能是 1.3.6)中修复。

然而,这在我的 1.3.7 中仍然被破坏。你能让这个发挥作用吗?我的语法有错误吗?请注意,如果我删除“e”,我就会得到要调用的函数(可以通过警报来判断)。但是,如果我添加“e”,则不会调用该函数。

谢谢

Per the remoteFunction documentation one can cause a javascript function to be called when the remoteFunction finishes, using the onComplete parameter. From examples I've seen on the web, one can supply a function with an event parameter, i.e.

 onComplete: 'finishUp(e)'

Then I found this is broken in 1.3.6, per Grails bugs filed, here and here, which was supposed to be fixed for 1.3.7 (perhaps 1.3.6), per the bug resolutions.

However, this is still broken in my 1.3.7. Are you able to get this to work? Is there a bug in my syntax. Note if I drop the 'e', I get the function to be called (can tell by an alert). But, if I add in the "e", the function doesn't get called.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

櫻之舞 2024-12-17 11:14:51

试试这个:

onComplete: 'finishUp'

看看它是否调用该函数以及事件对象是否存在于

function finishUp(e) { ... }

Try this:

onComplete: 'finishUp'

And see if it calls the function and if the event object is present in

function finishUp(e) { ... }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文