title: how to hide or show a textbox depending on radiobutton value in jsf
body: <p>I have a comment box and a need to show and hide the comment box depending on radio button select above. I dont want to use jquery and i am not getting any idea as am new to jsf primeface</p>
  
  <p>My code is bellow is:</p>
  
  <pre><code>&lt;h:outputText value="Action :" class="alignment"/&gt;
  
  &lt;p:selectOneRadio id="console" 
                    value="#{examinationFormBean.action}" 
                    required="true" label="Action"&gt;
      &lt;f:selectItem itemLabel="Ok" itemValue="ok" /&gt;
      &lt;f:selectItem itemLabel="Have Issued" 
                    itemValue="haveissue" /&gt;
  &lt;/p:selectOneRadio&gt;
  
  &lt;h:outputLabel value="Comment:"&gt;&lt;/h:outputLabel&gt;
  &lt;h:inputText id="compid"    
               value="#{examinationFormBean.comment}"/&gt;
  
  &lt;p:commandButton  value="Proceed to Zonal Electrical Inspector&gt;&gt;"
                    action="#{examinationFormBean.saveFormStatusByOfficeAssistent()}"  
                    update="messageid"  
                    process="data"  
                    oncomplete="if (args &amp;amp;&amp;amp; !args.validationFailed) PF('test').hide()" &gt;
  
      &lt;f:ajax  update="datatable"/&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>Please help me to sort it out. thanks in advance</p>