How to Perform a Javascript function using Primefaces wizard onnext attribute?
<p>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. </p>

<p>My error:</p>

<p><a href="https://i.stack.imgur.com/TtslL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TtslL.png" alt="jsf error"></a></p>

<p>My xhtml code:</p>

<pre><code>&lt;script&gt;
    function nextf(){
        PF('wizard').next();
    }
&lt;/script&gt;
...
&lt;p:wizard widgetVar="wizard" flowListener="#{editController.onFlowProcess}" onnext="nextf();"&gt;
</code></pre>

<p>Your help would be greatly appreciated.</p>