DataTable - SummaryRow

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

IdYearBrandColor
5cd82e081969AudiRed
bd77e7d81999AudiBlack
8bd196731982AudiBlue
9a6b97841976AudiWhite
ed3cd72b1992AudiSilver
249498e31987AudiOrange
b40dc4e92007AudiMaroon
Total:$4,680.00
cbb7e4f21988BMWMaroon
79f0b98c2007BMWMaroon
fcebba5a1960BMWOrange
36bc2d011967BMWBlack
Total:$90,682.00
5865ac491992FiatBlue
dfa4f9ef1974FiatMaroon
6cd0161e1981FiatBlue
e9104c541992FiatBrown
02ee97a82001FiatMaroon
6f39fcbd1965FiatSilver
6f93f69d1985FiatBrown
62532ecf1978FiatMaroon
084a755c1999FiatRed
Total:$69,932.00
3a1011a41971FordBrown
d7198f3c1979FordYellow
Total:$55,746.00
18386b191976HondaYellow
cfac97621972HondaMaroon
52ff6ec61983HondaBrown
19c655a32006HondaBrown
267390f21984HondaYellow
Total:$57,333.00
51e6770a1971JaguarMaroon
19d450641990JaguarRed
69aefffd1971JaguarYellow
830dcd331960JaguarOrange
6088b1151966JaguarMaroon
4e39170b1963JaguarSilver
Total:$97,997.00
cb851b7a1988MercedesMaroon
0c3a81321960MercedesBlue
6963dc5e2008MercedesOrange
e86814981993MercedesBrown
Total:$67,248.00
16e85a8f1988RenaultBrown
969ce3f71983RenaultGreen
Total:$15,643.00
d4d6b9f61986VolkswagenMaroon
70a426591964VolkswagenYellow
175b7d1a2007VolkswagenBlack
6858b9811985VolkswagenYellow
6d5c70b21970VolkswagenMaroon
799851c31964VolkswagenSilver
7167e3361991VolkswagenOrange
2d25ddfd2008VolkswagenBlue
Total:$13,237.00
dec279a51982VolvoBlue
dcc1a7551980VolvoSilver
004a00951995VolvoOrange
Total:$20,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>