title: Column header not visible when column is conditionally rendered
body: <p>I have a <code>h:dataTable</code>. I would like to render a row conditionally as follows:</p>
  
  <pre><code>&lt;h:dataTable value="#{myController.entities}" var="entity"&gt;
   &lt;h:column rendered="#{entity.selected}"&gt;
    &lt;f:facet name="header"&gt;
     &lt;h:outputText value="header" /&gt;
    &lt;/f:facet&gt;
    &lt;h:outputText value="#{entity.name}" /&gt;
   &lt;/h:column&gt;
  &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>In my controller there is variable <code>List &lt;Entity&gt;</code> entities which has getters and setters. </p>
  
  <p><code>Entity</code> class contains two variables : <code>boolean selected</code> and <code>String name</code> with its getters and setters.</p>
  
  <p>When <code>#{entity.selected}</code> is false, then the row is hidden. When <code>#{entity.selected}</code> is true, then the row is shown, <strong>but without header</strong>. When I do not use the rendered attribute on the column my header becomes visible.</p>
  
  <p>This question is similar to <a href="https://stackoverflow.com/questions/12948799/pcolumn-header-facet-is-not-shown-when-rendered-attribute-is-used-on-pcolumn">p:column header facet is not shown when rendered attribute is used on p:column</a></p>
  
  <p>But none of the solution given works for me and Iam not using primefaces.</p>
  
  <p>Can somebody help me with this? Iam new to JSF and the mistake might be something silly and fix fairly easy, but please help me figure it out. Thanks.</p>
  
  <p>Iam posting the outputs that I get when I tried the above code.</p>
  
  <pre><code>**Header**
  
  name 0
  
  name 1
  
  name 2
  
  name 3
  
  name 4
  </code></pre>
  
  <p>This output shows the datatable using simply <code>&lt;h:column&gt;</code> without trying to render it conditionally. The header can be seen.</p>
  
  <p>Now when I use conditional rendering:</p>
  
  <pre><code>name 1
  
  name 3
  </code></pre>
  
  <p>In this output Iam trying to use conditional rendering <code>&lt;h:column rendered="#{entity.selected}"&gt;</code>. As you can see that for "name 0", "name 3" and "name 5" the <code>#{entity.selected}</code> is false and hence its not rendering.
  This is exactly what I need but only if the header shows up.</p>
  
  <p>I want to render my <strong>row</strong> invisible where the <code>#{entity.selected}</code> value is false. Also show the column header. Can this be possible?</p>