DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
46cd04c11972AudiGreen
adc9b6481969AudiWhite
9bdd656d1986AudiSilver
Total:$49,957.00
cf7ea7841966BMWBlack
c3d332a12000BMWBrown
7bdb9d041998BMWOrange
Total:$89,754.00
d653d9fb1966FiatBlue
475118e31993FiatYellow
d7799dfa1977FiatYellow
e3434e091972FiatGreen
216d8aae2004FiatMaroon
Total:$94,452.00
f5e2b5cf1980FordOrange
c9f0aa3c2004FordBrown
4650ed1c1967FordRed
176922412002FordBlue
1ce226731971FordBlack
c48730af1987FordBlue
Total:$47,512.00
2c9aa25a1978HondaRed
31f741d92000HondaBrown
381348561962HondaBlue
a333bfb61976HondaBlue
632620191966HondaOrange
Total:$48,864.00
e5898a601998JaguarYellow
ba06aa641962JaguarYellow
8bf918021962JaguarSilver
Total:$97,589.00
4e973bd41967MercedesSilver
7f51d5782009MercedesWhite
44fc077f1979MercedesYellow
7e4f6e5e2006MercedesMaroon
b33281621969MercedesBlack
a821b2491984MercedesGreen
9f122e971964MercedesSilver
3dab0e732001MercedesBlue
508fb9a41974MercedesRed
a6bd8a921983MercedesSilver
Total:$38,123.00
4775dde41970RenaultBlack
e72952722005RenaultGreen
fe3e88f91999RenaultSilver
46bb52c01993RenaultSilver
d1267fe01984RenaultBrown
Total:$24,034.00
310d61502004VolkswagenOrange
2e066f3b2004VolkswagenBlack
50a85a7b1960VolkswagenBlue
2713b18c1962VolkswagenBrown
c0095d3b1971VolkswagenBlack
Total:$34,286.00
78d7b4812004VolvoGreen
57d724a11988VolvoYellow
8014e93c1999VolvoBrown
59e69d832005VolvoMaroon
a8193f001976VolvoGreen
Total:$34,562.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.