简体   繁体   English

<a4j:ajax oncomplete> 不会在时触发 <a4j:support oncomplete> 没有

[英]<a4j:ajax oncomplete> is not triggered while <a4j:support oncomplete> did

I'm trying to trigger a javascript function using the a4j:ajax method. 我正在尝试使用a4j:ajax方法触发javascript函数。 We are migrating from version 3 to version 4, and have also been upgrading spring and JSF. 我们正在从版本3迁移到版本4,并且还一直在升级spring和JSF。 Previously, this worked fine: 以前,这很好用:

<a4j:support event="change" oncomplete="callJavascriptMethod()">

With version 4 of RichFaces, I'm trying to do the same, calling a javascript function everytime a dropdown list is beeing changed, but I have changed to use: 对于RichFaces的版本4,我试图做同样的事情,每次下拉列表更改时都调用javascript函数,但是我已更改为使用:

<a4j:ajax event="change" oncomplete="callJavascriptMethod()">

I have also tried something like this just to see if the event's are triggered: 我也尝试过类似这样的事情,只是看事件是否被触发:

<h:commandButton id="test" value="Test me!">
    <a4j:ajax event="click" oncomplete="console.log('something');" />
</h:commandButton>

So far without luck. 到目前为止没有运气。 Any ideas? 有任何想法吗?

The commandButton example above is working in our migration. 上面的commandButton示例在我们的迁移中有效。 We had a lot of issues with a4j:ajax in 4.3.2 but upgrading to 4.3.4 seemed to fix most of the issues, so if that is an option and hasn't been done I would recommend getting the latest version for RichFaces 4. 我们在4.3.2中使用a4j:ajax遇到了很多问题,但是升级到4.3.4似乎可以解决大多数问题,因此,如果这是一个选项并且尚未完成,我建议您获取RichFaces 4的最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM