I would like to execute a JavaScript function after the page was loaded. At the moment I have a commandButton and everything works fine. However it would be more comfortable
There are 2 ways that work for me, when I want to execute a JS function after page load in Primefaces:
jQuery(document).ready(function () {
jQuery(document).ready(function () {
// twice in document.ready to execute after Primefaces callbacks
PathFinder.findAndGo();
});
});