DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
733738fa1972AudiYellow
f091e5eb1965AudiYellow
0efc64231965AudiOrange
19de9d001992AudiSilver
6451a1d51967AudiBlue
Total:$80,914.00
85192a7d1989BMWSilver
a3414bd31976BMWYellow
9e149f2a1977BMWBlack
c00c42341996BMWGreen
31b982511998BMWGreen
c3f982b42001BMWBlue
347a482f1972BMWOrange
Total:$67,694.00
4a7fae5b1985FiatGreen
3a3a286b1969FiatMaroon
694c1fe81962FiatWhite
aaae27901963FiatWhite
Total:$11,210.00
a443379a1990FordBlack
f5c695a01987FordRed
16a36d641971FordRed
5dc7d76a1987FordSilver
966b89741992FordRed
Total:$24,342.00
55ac37511963HondaYellow
999f87102000HondaMaroon
e8ceeac01988HondaRed
78c6508e1999HondaGreen
1c46fcda1987HondaBlue
Total:$30,082.00
562955f62005JaguarWhite
dce3bf681999JaguarYellow
9b50effc1994JaguarOrange
a3b2ce921962JaguarSilver
508400942000JaguarBlack
Total:$66,325.00
f77826d11978MercedesBrown
1033b7f51983MercedesBlue
356a98bd1998MercedesOrange
0596a63c2003MercedesBrown
Total:$67,931.00
745971fe2007RenaultWhite
c5ffe6bd1969RenaultWhite
064853ae1988RenaultOrange
61b75d891986RenaultBlack
Total:$4,598.00
3e674a041988VolkswagenBlue
01ac0eb21968VolkswagenSilver
10e283651983VolkswagenBlue
bc4340972003VolkswagenOrange
f92185fd1991VolkswagenBlack
Total:$94,531.00
32dd60f81970VolvoRed
e43968e21988VolvoYellow
67a88a7d1966VolvoYellow
4999cc961991VolvoBrown
3524fef81971VolvoOrange
23fd62201982VolvoBlack
Total:$18,670.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 © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.