Espen S.
Espen S.

Reputation: 877

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

I'm trying to trigger a javascript function using the a4j:ajax method. We are migrating from version 3 to version 4, and have also been upgrading spring and 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:

<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?

Upvotes: 0

Views: 3656

Answers (1)

itsthejash
itsthejash

Reputation: 138

The commandButton example above is working in our migration. 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.

Upvotes: 1

Related Questions