title: How to put Subrows inside dataTable in PrimeFaces v3.5
body: <p>I simply wants to put some subrows in my <code>p:dataTable</code>. I have a list of cars which can be bought by any number of people. I want to show this in a datatable. In which first row contains the information about the car, the next following lines contains information about the buyer. This pattern will be repeated for each car.</p>
  
  <p>Below is my car bean, which is having an array of buyer (Getters and setters are omitted here)-</p>
  
  <pre><code>public class Car {    
      private int id;
      private String name;
      private String model;
      private Buyer[] buyer;
  }
  </code></pre>
  
  <p>The Buyer bean looks like below-</p>
  
  <pre><code>public final class Buyer {
      private int id;
      private String name;
      private String address;
  }
  </code></pre>
  
  <p>Finally below is the controller, which contains a list of cars-</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class Seller implements Serializable{
      private List&lt;Car&gt; list;
  }
  </code></pre>
  
  <p>As per Daniel's suggesation, I implemented it in this way-</p>
  
  <pre><code>    &lt;p:panel&gt;
          &lt;h:form&gt;
              &lt;p:dataTable id="dataTable" var="car" value="#{seller.list}"&gt;
                  &lt;p:column style="width:4%"&gt;  
                      &lt;p:rowToggler /&gt;  
                  &lt;/p:column&gt; 
                  &lt;p:column style="width:32%"&gt;  
                      &lt;f:facet name="header"&gt;  
                          Id
                      &lt;/f:facet&gt;  
                      &lt;h:outputText value="#{car.id}" /&gt;  
                  &lt;/p:column&gt;  
                  &lt;p:column style="width:32%"&gt;  
                      &lt;f:facet name="header"&gt;  
                          Name
                      &lt;/f:facet&gt;  
                      &lt;h:outputText value="#{car.name}" /&gt;  
                  &lt;/p:column&gt;  
                  &lt;p:column style="width:32%"&gt;  
                      &lt;f:facet name="header"&gt;  
                          Model
                      &lt;/f:facet&gt;  
                      &lt;h:outputText value="#{car.model}" /&gt;  
                  &lt;/p:column&gt;
                  &lt;p:rowExpansion&gt;  
                      &lt;p:dataTable var="buyer" value="#{car.buyer}"&gt;  
                          &lt;p:column headerText="Id"&gt;  
                              &lt;h:outputText value="#{buyer.id}" /&gt;  
                          &lt;/p:column&gt;  
                          &lt;p:column headerText="Name"&gt;  
                              &lt;h:outputText value="#{buyer.name}" /&gt;  
                          &lt;/p:column&gt;  
                          &lt;p:column headerText="Address"&gt;  
                              &lt;h:outputText value="#{buyer.address}" /&gt;  
                          &lt;/p:column&gt;  
                      &lt;/p:dataTable&gt;  
                  &lt;/p:rowExpansion&gt;
              &lt;/p:dataTable&gt;  
          &lt;/h:form&gt;
      &lt;/p:panel&gt;
  </code></pre>