DataTable - SummaryRow

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

IdYearBrandColor
d18780381997AudiRed
003c281b1960AudiGreen
31d5532f1974AudiYellow
Total:$37,210.00
7988203e1989BMWMaroon
9bcd4d2f2003BMWOrange
2d0c4fd81992BMWMaroon
Total:$27,377.00
af64e42c1997FiatSilver
830510f11980FiatBrown
2e24c89a1990FiatYellow
fb9ab1d01992FiatMaroon
4e1db6751981FiatMaroon
0238ebfa1984FiatWhite
450bd8171998FiatBlack
52e3f75d1981FiatWhite
Total:$6,751.00
99c7f9d32001FordRed
34a899f41968FordBrown
06ef5e382000FordGreen
40a2bf061962FordMaroon
01bf13031967FordBrown
Total:$67,775.00
1cf973e82004HondaSilver
858ce2231982HondaYellow
145925111999HondaRed
cf9838662000HondaSilver
03b093351971HondaOrange
82360fa41989HondaBrown
Total:$19,989.00
d00c5a361969JaguarBlack
e56749522009JaguarSilver
20db263f1974JaguarMaroon
5c0fceb91992JaguarOrange
8f80fe021969JaguarGreen
d91110832000JaguarOrange
Total:$80,235.00
305901aa1974MercedesRed
d114ba921992MercedesOrange
1806777c2003MercedesBlack
e47d73101994MercedesGreen
b810000e1998MercedesWhite
2069e4581994MercedesOrange
79f284781963MercedesYellow
2215618f1980MercedesBrown
786aec4f1996MercedesRed
Total:$24,374.00
ce1447c01994RenaultBlue
3423087a1962RenaultMaroon
ac359b3d1968RenaultGreen
Total:$49,864.00
e2eee6a51991VolkswagenRed
e618dd311960VolkswagenBlue
e9bc0a741965VolkswagenYellow
Total:$86,872.00
57a0d6531997VolvoBlack
d8956e781967VolvoWhite
5c9ad41b1999VolvoMaroon
8720ae3b1967VolvoBlack
Total:$12,074.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>