title: Display values in JSF table
body: <p>I have a Java object with 30 attributes. I populate the object from database. I want to display only values which are not empty.</p>
  
  <pre><code>&lt;table&gt;
      &lt;col width="280"/&gt;&lt;col width="130"/&gt;
  
      &lt;ui:repeat var="ud" value="#{TreeViewController.componentData}"&gt;
  
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;h:outputText value="componentStatsId" rendered="#{ud.componentStatsId != 0}"/&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;h:outputText value="#{ud.componentStatsId}" rendered="#{ud.componentStatsId != 0}"/&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  
          .......... and 40 more table rows
  
      &lt;/ui:repeat&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I tested to create simple JSF table with rows which are not rendered if the values are empty. But I noticed that if the values are empty I get tiny spaces:</p>
  
  <p><img src="https://i.stack.imgur.com/MWiyG.png" alt="enter image description here"></p>
  
  <p>How I can solve this problem?</p>