I'd like to add one line to a datatable. This line would be exactly the same kind of lines that the ones already in the datatable.
In this example, my list of cars can't be changed. And I have an extra car to add at the first line.
<p:dataTable var="car" value="#{myListOf.cars}">
<p:column headerText="Id">
<h:outputText value="#{car.id}" />
</p:column>
<p:column headerText="Year">
<h:outputText value="#{car.year}" />
</p:column>
<p:column headerText="Brand">
<h:outputText value="#{car.brand}" />
</p:column>
<p:column headerText="Color">
<h:outputText value="#{car.color}" />
</p:column>
and my extra car:
Car extraCar = new car;
car.setId("345434354");
car.setYear("2016");
car.setBrand("dfdsf");
car.setColor("Blue");