DataTable - SummaryRow

SummaryRow is a helper component of datatable used for dynamic grouping.

IdYearBrandColor
5ebe8c881968BMWWhite
e44e30d11977BMWGreen
98a658771998BMWGreen
5f840b151988BMWWhite
0cbc51d22003BMWYellow
04de0a251967BMWBlue
b68fd37d1968BMWOrange
b4d70ce91990BMWYellow
0560650e1960BMWRed
Total:$62,167.00
b5f5f63d2008FiatBlue
88d6734b1962FiatBlue
335f04aa1964FiatBlue
0584153d1992FiatGreen
e58baad81997FiatSilver
42a9e0882002FiatYellow
1e94c7131982FiatMaroon
cbd7c99e1989FiatSilver
Total:$86,763.00
cd341c4b1984FordBlack
6021929f1981FordBrown
aadd77f51995FordRed
0b5c61e31976FordGreen
Total:$44,346.00
36fb52b91964HondaBrown
f8e3d7632008HondaYellow
64e055f11971HondaBrown
87fd6e731987HondaRed
34b4848d1978HondaBlack
d984019a1962HondaMaroon
bb2c3de82006HondaOrange
Total:$61,451.00
322dec9f1978JaguarBlue
1f42b7a41977JaguarYellow
2127c4b42006JaguarBlack
cc55bc851985JaguarOrange
3d9172311982JaguarSilver
8e6751392005JaguarSilver
Total:$86,273.00
68fcb9201999MercedesOrange
d642530f1977MercedesMaroon
3d9b9ad62005MercedesWhite
7d40b6981998MercedesRed
47b749711978MercedesBlue
Total:$98,104.00
be591fc91973RenaultOrange
522174e91977RenaultRed
Total:$45,856.00
779c33f01996VolkswagenBlue
738d6b811962VolkswagenBrown
2c79b00c1971VolkswagenRed
b9426b0f1974VolkswagenOrange
Total:$47,285.00
53c897a81983VolvoWhite
411ff6be1986VolvoYellow
9e8343fe1963VolvoRed
c952feab1993VolvoYellow
d00486fe1998VolvoOrange
Total:$45,225.00
<h:form>
    <p:dataTable var="car" value="#{dtSummaryRowView.cars}" sortBy="#{car.brand}">
        <p:column headerText="Id" sortBy="#{car.id}">
            <h:outputText value="#{car.id}" />
        </p:column>
        <p:column headerText="Year" sortBy="#{car.year}">
            <h:outputText value="#{car.year}" />
        </p:column>
        <p:column headerText="Brand" sortBy="#{car.brand}">
            <h:outputText value="#{car.brand}" />
        </p:column>
        <p:column headerText="Color" sortBy="#{car.color}">
            <h:outputText value="#{car.color}" />
        </p:column>
        <p:summaryRow>
            <p:column colspan="3" style="text-align:right">
                <h:outputText value="Total:" />
            </p:column>
            <p:column>
                <h:outputText value="#{dtSummaryRowView.randomPrice}">
                    <f:convertNumber type="currency" currencySymbol="$" />
                </h:outputText>
            </p:column>
        </p:summaryRow>
    </p:dataTable>
</h:form>