DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
d77cf2ea2002AudiGreen
20ef52311962AudiMaroon
97f1a9011974AudiSilver
03238b3f1975AudiSilver
0097b8141972AudiOrange
Total:$58,784.00
b355046d2005BMWMaroon
814620b01985BMWBrown
5d731d9a1971BMWSilver
56e9b1581982BMWRed
e01d20981977BMWGreen
54c450b71988BMWRed
aef208d51972BMWMaroon
3beac9931982BMWYellow
a99939242004BMWBrown
Total:$18,897.00
1a1f39472000FiatRed
df1861371969FiatWhite
85bee4501991FiatRed
2c4c19771985FiatBrown
77fb4e0d2008FiatBrown
63f234071988FiatMaroon
Total:$52,644.00
c7a0a6922003FordWhite
508f1d7b1984FordRed
1432a62d2009FordMaroon
41cab04f2002FordWhite
5fc447b61981FordGreen
Total:$95,968.00
b3f02b6c1981HondaGreen
f172d6551960HondaBrown
953668901971HondaBlack
1036f1121963HondaMaroon
Total:$10,087.00
865f32171960JaguarYellow
a2a149281980JaguarYellow
130af59e1978JaguarSilver
7e8850901963JaguarOrange
e1d4f25b1969JaguarSilver
8efd95d51994JaguarOrange
Total:$76,673.00
08f52ea01966MercedesOrange
Total:$82,446.00
cac0d7651979RenaultBlack
24cb92a71972RenaultMaroon
b5a9692e2003RenaultOrange
8e23d0ee1995RenaultBlack
a6fd884e2005RenaultBrown
cd819f6c1987RenaultWhite
Total:$33,917.00
f658dfcf1975VolkswagenYellow
2afab7171962VolkswagenOrange
33a4b9421995VolkswagenOrange
Total:$4,294.00
ba31ef901963VolvoBlack
e8c9c4a21984VolvoBlue
ef11a9501997VolvoRed
cca91a891991VolvoWhite
50a5488d1996VolvoSilver
Total:$75,501.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.