I have the following ArrayList
class Report{
private String manufacturer;
private String color;
private List<Double> revenue;
}
How can I display it on primefaces datatable. I tried using p:columns it is not working. I have following code on XHTML page
<p:dataTable value="#{tableBean.reportList}" var="report" id="table">
<p:column headerText="Manufacturer">#{report.manufacturer}</p:column>
<p:column headerText="Color">#{report.color}</p:column>
</p:dataTable >
I also tried p:columns and ui:repeat. But I am not able to achieve desired output. result.
<p:columns var="amount" value="#{report.revenue}">#{amount}</p:columns>
<ui:repeat var="amount" value="#{report.revenue}">
<p:column headerText="Revenue">#{amount}</p:column>
</ui:repeat>
I need output as a table with manufacturer name, color and all revenues