title: PrimeFaces Wizard disable/enable custom back/next button?
body: <p>I am using PF5.3 Wizard component in my page and using custom Next/Back button i am able to disable/enable these buttons by below code</p>
  
  <pre><code>&lt;p:wizard style="border:0" showNavBar="false" widgetVar="terminationWizard" flowListener="#{equipTemplateBean.flowListener}"
                          onback="if (PF('terminationWizard').getStepIndex(PF('terminationWizard').currentStep) === 0) { PF('stepBackward').disable(); } PF('stepForward').enable();"
                          onnext="if (PF('terminationWizard').getStepIndex(PF('terminationWizard').currentStep) === 1) { PF('stepForward').disable(); } PF('stepBackward').enable();"&gt;
  </code></pre>
  
  <p>my question is that how to hide/she these button i tried below code</p>
  
  <pre><code>onback="if (PF('terminationWizard').getStepIndex(PF('terminationWizard').currentStep) === 0) { PF('stepBackward').hideBackNav(); } PF('stepForward').showBackNav();"
  onnext="if (PF('terminationWizard').getStepIndex(PF('terminationWizard').currentStep) === 1) { PF('stepForward').hideNextNav(); } PF('stepBackward').showNextNav();"
  </code></pre>
  
  <p>but it is not working .
  How to use <code>showNextNav()</code>,<code>hideNextNav()</code>,<code>showBackNav()</code>,<code>hideBackNav()</code> methods to hide/she custom buttons?</p>
  
  <p>CommandButton code</p>
  
  <pre><code>&lt;p:commandButton widgetVar="stepBackward"   value="Back" icon="ui-icon-arrow-1-w" iconPos="right" onclick="PF('terminationWizard').back()" update="submitButton"/&gt;
  &lt;p:commandButton value="Next" icon="ui-icon-arrow-1-e" iconPos="left"
  onclick="PF('terminationWizard').next();" widgetVar="stepForward" update="submitButton"/&gt;
  </code></pre>