DataTable - SummaryRow

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

IdYearBrandColor
7f22e33d2005AudiRed
d3b5c4db1984AudiGreen
68d18fd91990AudiOrange
Total:$81,336.00
9db148251964BMWGreen
9fc68acb2005BMWRed
57d5ce071969BMWGreen
2bc651942003BMWOrange
382469fc1964BMWGreen
475746181994BMWYellow
2e8a5f741963BMWMaroon
594fbf151997BMWYellow
Total:$64,196.00
47d846ff2008FiatWhite
cf084e251985FiatBrown
9f328d431984FiatWhite
3afccc862007FiatBlack
Total:$6,467.00
86e2bc731987FordSilver
c99b683a1987FordBlack
14a09a251991FordSilver
69784f561989FordBlack
8f6260e71973FordGreen
0acc5edf1969FordBlack
c32ae97a1998FordWhite
fd342a0a1996FordBlue
bfd420081995FordRed
Total:$41,884.00
7172b1341982HondaGreen
48cd29571973HondaBlack
94240cc31970HondaOrange
c6c672652005HondaWhite
Total:$95,790.00
9838e0b51967JaguarOrange
444b9e6f1977JaguarMaroon
33fb76082002JaguarGreen
Total:$17,745.00
9fd28ed61975MercedesOrange
c09ff5632000MercedesGreen
45ab24211977MercedesOrange
c3e6fe951964MercedesWhite
Total:$19,138.00
c18d44cd1966RenaultRed
aac3d43b1985RenaultGreen
389383d41980RenaultOrange
41daa4671970RenaultBlue
5f5ad15d1968RenaultWhite
Total:$97,307.00
7a65095b1971VolkswagenBrown
2e3072d41971VolkswagenWhite
aac8fb2d2004VolkswagenRed
a21aa9b51962VolkswagenRed
Total:$50,617.00
cbfa67811970VolvoWhite
0bee450f1978VolvoGreen
30513cbb1986VolvoSilver
0885db922000VolvoGreen
6037460e1971VolvoBlue
c249ce031999VolvoWhite
Total:$92,303.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>