title: Hide and show dataTable column with a button in Primefaces
body: <p>I get a dataTabel with a lot of content. And for each row, i get in the last column a iFrame-Link. Based on these links, the page takes a lot of time to load.<br>
  Now I want to hide this column to get a faster loading. The user should able to show the column with a button. But how can i realize that? Here's the content of the column:</p>
  
  <pre><code>&lt;p:commandButton value="Show book"&gt;
    &lt;f:setPropertyActionListener value="true" target="#{rollCommunityBean.renderPhoneColumn}" /&gt;
  &lt;/p:commandButton&gt;
  
  &lt;p:column exportable="false" rendered="#{rollCommunityBean.renderPhoneColumn}"&gt;
    &lt;f:facet name="header"&gt;
      &lt;h:outputText value="Link" /&gt;
    &lt;/f:facet&gt;
  
    &lt;p:lightBox iframe="true" width="750pt" height="650pt"&gt;
      &lt;h:outputLink rendered="#{member.username.length() &gt; 0}" value="url" title="#{member.username} - #{member.name} #{member.vorname}"&gt;
        &lt;h:outputText icon="ui-icon-person" value="Telefonbuch" /&gt;
      &lt;/h:outputLink&gt;
    &lt;/p:lightBox&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <p><strong>RollCommunityBean</strong>
  </p>
  
  <pre><code>public class RollCommunityBean {
      /*
       * All rendering Booleans
       */
  
      // For the Phonebook iFrame Column
      private boolean renderPhoneColumn;
  
      /*
       * All Getter and Setter for the rendering Booleans
       */
      public boolean getRenderPhoneColumn() {
          return renderPhoneColumn;
      }
  
      public void setRenderPhoneColumn(boolean renderPhoneColumn) {
          this.renderPhoneColumn = renderPhoneColumn;
      }
  }
  </code></pre>