6

I'm using primefaces and have a problem executing JavaScript at the end of an ajax call. I add some action to the RequestContext, and it is executed twice!

RequestContext.getCurrentInstance().execute("alert('I'm here!')");

It is also embedded twice in the XML which I get back from the server - two times the same component and same node.

Primefaces Version is 5.3.10

Any ideas what is going wrong here? Thanks.

anm
  • 545
  • 3
  • 17

3 Answers3

4

It has been a while since last answer and problem seems to be solved but I believe I know what is going on and the reason new deployment solved the problem.

It seems it happens when you have more than one primefaces*.jar inside EAR (i.e. EAR/lib and WAR/WEB-INF/lib.

If anyone else is facing this problem, try to remove from EAR/lib (or EAR root), keep only one primefaces*.jar in EAR.

Emilio Numazaki
  • 836
  • 1
  • 5
  • 25
0

I avoided such error by changing version of Primefaces from 6.0 to 6.1 in POM. (6.1 version was in libs of server Payara)

-4

OK, it seems that it was a deployment-problem. We deployed it again and the problem is solved...

anm
  • 545
  • 3
  • 17