title: Use ui:repeat inside datatable for all the columns
body: <p>I have a problem with h:datatable and ui:repeat.</p>
  
  <p>I have the next objects structure:</p>
  
  <ul>
  <li>Product
  <ul>
  <li>SubproductType1</li>
  <li>SubproductType2</li>
  <li>SubproductType3</li>
  </ul></li>
  </ul>
  
  <p>In the datatable I need to show info of the Product and info of one of the subproducts like:</p>
  
  <pre><code>Name         Price       StartDate       EndDate
  P1Name        25$        01/01/13        01/07/13
  P2Name        25$        01/01/13        01/07/13
  </code></pre>
  
  <p>The price and Dates comes from the SubproductType2 price attribute.</p>
  
  <p>So if I have this</p>
  
  <pre><code>&lt;h:dataTable value="#{bundleBean.products}" var="myBundle" &gt;
  
      &lt;ui:param name="currentSubProd" value="#sbaBean.getSubProdOfBundleFilterByCategory(myBundle.id, categoryType.internet)}" /&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;Name&lt;/f:facet&gt;
                              #{myBundle.name}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;Price&lt;/f:facet&gt;
                              #{currentSubProd.price}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;StartDate&lt;/f:facet&gt;
                              #{currentSubProd.startDate}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;EndDate&lt;/f:facet&gt;
                              #{currentSubProd.endDate}
                  &lt;/h:column&gt;
  &lt;/h:dataTable&gt;                      
  </code></pre>
  
  <p>It works perfectly but it invokes to the bean method every time #currentSubProd is called in the xhtml file, 3 times in this case. So if I have some query inside the method the DB is doing the query 3 times.</p>
  
  <p>I realiced that with ui:repeat inside a column it works fine but you can't put and ui:repeat outside it using an ui:repeat for every column on the datatable.</p>
  
  <p>Like this (NOT Working):
      </p>
  
  <pre><code>    &lt;ui:repeat name="currentSubProd" value="#sbaBean.getSubProdOfBundleFilterByCategory(myBundle.id, categoryType.internet)}" &gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;Name&lt;/f:facet&gt;
                              #{myBundle.name}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;Price&lt;/f:facet&gt;
                              #{currentSubProd.price}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;StartDate&lt;/f:facet&gt;
                              #{currentSubProd.startDate}
                  &lt;/h:column&gt;
                      &lt;h:column&gt;
                      &lt;f:facet name="header" &gt;EndDate&lt;/f:facet&gt;
                              #{currentSubProd.endDate}
                  &lt;/h:column&gt;
      &lt;/ui:repeat&gt;
  &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>Any idea how to solve that? </p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards.</p>