grails RemoteFunction onComplete,传递事件?漏洞?
根据 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
看看它是否调用该函数以及事件对象是否存在于
Try this:
And see if it calls the function and if the event object is present in