Michiel de Mare
Michiel de Mare

Reputation: 42460

JSF: Javascript in Ajax JSF-response

I'd like to execute Javascript after an Ajax-request in JSF? I can execute Javascript with the onevent listener, but the code I want to execute should be sent in the Ajax-response.

But apparently, JSF strips out script tags in the Ajax response. So what's the official way to do this?

Upvotes: 1

Views: 573

Answers (1)

michal777
michal777

Reputation: 404

To execute js on every ajax request use Omnifaces onloadScript component:

Omnifaces onloadScript showcase

Upvotes: 1

Related Questions