DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
a87a2f2f1981AudiBlue
e60ae0022008AudiYellow
23ebaa391973AudiBlue
946efb431963AudiYellow
Total:$80,856.00
de98d0ca1986BMWMaroon
98442da91978BMWBlue
8bcc3a141989BMWOrange
f9d9c3301970BMWBlue
abb6b0d11989BMWGreen
7f0fc8c02004BMWSilver
d61735b11982BMWWhite
Total:$20,066.00
3f816abb1991FiatYellow
370ebda31967FiatBlue
65813a841998FiatRed
b02963271998FiatBlack
e21773471987FiatRed
f40e36711993FiatBlue
f90a712a1960FiatYellow
Total:$38,206.00
5d4d7c881975FordBrown
4de1afb82000FordRed
9df089ce1968FordOrange
709c2c0c1966FordMaroon
087743de1962FordBlack
b867c0381984FordYellow
Total:$9,574.00
30dd064b1987HondaWhite
90b55ff12004HondaGreen
61bcacb41967HondaWhite
fd9375051964HondaWhite
Total:$26,163.00
585043261970JaguarMaroon
6d5f9b6c2007JaguarBlue
9782a1981963JaguarYellow
25ddc5211963JaguarBlack
9a79707a1973JaguarGreen
931526981999JaguarBlack
a266a81c1961JaguarMaroon
Total:$14,186.00
ce3f64ab1964MercedesGreen
867cc5cb1990MercedesRed
d6a3edc11997MercedesRed
91901e1d1979MercedesYellow
2f047acb1996MercedesBlue
Total:$15,723.00
aed63c8b2007RenaultRed
e954cc821974RenaultWhite
26fdd34e1971RenaultSilver
535e6c2f1977RenaultBlack
Total:$17,346.00
de83ddcc1988VolkswagenRed
087862281991VolkswagenYellow
2f1fe0e11965VolkswagenBlack
28e3a2191962VolkswagenSilver
fe44e88e1960VolkswagenGreen
Total:$11,293.00
7c26e7af1994VolvoYellow
Total:$72,138.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>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.1-SNAPSHOT on Mojarra-2.2.8.