title: How to hide/show a panel conditionally in primefaces/jsf2 on commandButton click?
body: <p>I want to hide/show <code>&lt;p:panel&gt;</code> on commandButton click with some condition ,I tried following</p>
  
  <pre><code>&lt;h:form&gt;
  // some tag here
  &lt;p:commandButton value="EDIT" ajax="false"
                          onclick="if(#{bean.status == 'ACTIVE'}){editable.show();}"
                          actionListener="#{beanMgnt.edit}"&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>and  editable is a panel as</p>
  
  <pre><code>&lt;p:panel widgetVar="editable" closable="true"
                  toggleable="true" visible="false"&gt;
                  // some tags here
              &lt;/p:panel
  </code></pre>
  
  <p>edit method is doing only sysout.</p>
  
  <p>What I want when enduser clicks the button this panel will be visible with bean data populated with Editable text boxes.</p>
  
  <p>I want to make visible this panel visible with button click.How to do that?</p>