title: Rendered Panel won't hide
body: <p>I have a small application using Primefaces, JSF that allows users to edit text content when a "edit" button is clicked. When the edit button is clicked a panel is displayed on the page with an "Exit" button, to exit the edit mode. This all works fine. However, when the user clicks the exit button the panel is supposed to hide again. Here is the relevant code:</p>
  
  <pre><code>   &lt;p:panel id="editModePanel" rendered="${editorBean.id&gt;0}"&gt;
       &lt;p&gt;Edit Mode: All changes will be saved to existing blog post&lt;/p&gt;
                    &lt;p:commandButton  accesskey=""value="Exit"
                                       update="@form" 
                                       action="#{editorBean.exitEditMode()}"
                                       onclick="PF('block').show();"
                                       oncomplete="PF('block').hide();"
                                       styleClass="ui-priority-primary"
                                       &gt;
                     &lt;/p:commandButton&gt;
              &lt;/p:panel&gt;
  </code></pre>
  
  <p>Before the panel is rendered, when the user clicks an edit button (not shown) the editorBean.id value is set to a number which causes the panel to be rendered on the form submit. </p>
  
  <p>When the user clicks exit to leave edit mode the editorBe.id is set to null, I have verified that this is happening. However, the panel will not hide, it stays rendered. </p>
  
  <p>I've tried using onclick to toggle the panel on and off. However, the view is Sessionscoped so I need the status to persist if the user refreshes the page or closes the browser window. </p>
  
  <p>Thanks in Advance!</p>