I am using PrimeFaces 5.3 and eventually want to use the onnext attribute of the wizard to hide the Next button using hideNextNav(). However, I am currently just trying to test this functionality by calling the next() method instead. Since I am new to primefaces and jsf in general, I have attempted using various syntax, but all my attempts have rendered the Next button non-functional. When I try alert() instead, it works correctly, showing a message box and proceeding to the next tab.
My error:
My xhtml code:
<script>
function nextf(){
PF('wizard').next();
}
</script>
...
<p:wizard widgetVar="wizard" flowListener="#{editController.onFlowProcess}" onnext="nextf();">
Your help would be greatly appreciated.

next()call will triggeronnextevent. What exactly do you want? Why are you callingnext()once more whilenext()is already being called? (and thus you're basically callingnext()in an infinite loop, as evident by the error message and stack trace). - BalusC