DataTable - SummaryRow

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

IdYearBrandColor
71f7ba141976AudiBrown
1a614d861969AudiWhite
3a0313e61977AudiOrange
f5563c2a1964AudiSilver
Total:$69,602.00
117b03311989BMWRed
cd9848bc1966BMWMaroon
0231fe692000BMWOrange
d82908431974BMWBlue
d7988aae1960BMWBlue
2077be7d1980BMWWhite
80cde0cf1983BMWWhite
cefaf35b1960BMWMaroon
8d84cc631966BMWMaroon
Total:$47,275.00
1d830d6f1973FiatYellow
14ee1c1a1968FiatRed
304b576e2003FiatBlack
Total:$47,573.00
59ecbb6c2009FordSilver
27f9350c1972FordBlue
2a1166e82004FordBlack
Total:$33,724.00
2d7d34d52008HondaMaroon
048515e81973HondaBrown
fe13f6ad1993HondaGreen
46b3a4281983HondaRed
9555c04c1967HondaWhite
a12692641979HondaGreen
1b493eac2006HondaMaroon
c68b3ade1968HondaOrange
2f98cc6c1962HondaYellow
40967c2c1980HondaOrange
52a2e19a1981HondaYellow
Total:$92,797.00
e26590322002JaguarBlack
30d4986b1989JaguarBrown
7028e6e21999JaguarWhite
7278759d2002JaguarBlack
24bed4c41984JaguarGreen
Total:$43,383.00
e58615372000MercedesWhite
5e75f3d61975MercedesBlue
cf829a9b1970MercedesSilver
ea126f7a1993MercedesSilver
0b0015cc1962MercedesRed
Total:$92,371.00
7caf14441992RenaultBlack
30929ae91982RenaultMaroon
aa81258c1981RenaultBlue
Total:$63,076.00
961f9f392001VolkswagenSilver
d185eb4d1960VolkswagenBlue
6dd8e75a1970VolkswagenSilver
6aa5e2641978VolkswagenBlue
bc2083941961VolkswagenBlue
Total:$27,837.00
b411d6b41971VolvoMaroon
dba9b3b91961VolvoBlue
Total:$14,962.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>