DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
344367c91968AudiOrange
b2995f922003AudiGreen
95b637651987AudiBrown
5b79a1fa1985AudiRed
Total:$90,985.00
3334593a1978BMWBlue
555702571971BMWMaroon
bd3fa1172003BMWOrange
666fd56c1988BMWGreen
b7f904071964BMWYellow
82c4a35d1994BMWOrange
Total:$56,728.00
c74757e02000FiatMaroon
0089a1761965FiatBlack
6312fdb11992FiatBrown
a5d88c6a2008FiatOrange
c407612a1998FiatBrown
8baddb021997FiatYellow
Total:$21,446.00
5beac57a1978FordSilver
5da8b48c1987FordOrange
8c3814ce1989FordWhite
02957ab52007FordMaroon
994cb2591993FordBlue
Total:$90,615.00
3584ae8e1994HondaSilver
de02554a1963HondaSilver
14ab52391993HondaWhite
09467d8f2000HondaGreen
4aab48b41991HondaOrange
103afe0e1963HondaOrange
Total:$25,798.00
43ebb9bd1965JaguarGreen
4cecfd941970JaguarSilver
3488b88a1962JaguarBlack
df0cc6031994JaguarWhite
Total:$83,969.00
cff96cca1968MercedesYellow
a04ad3d61997MercedesWhite
688c1d451981MercedesRed
37622b6d1968MercedesBlack
ac7dd7d11961MercedesBlue
994bb4331992MercedesBrown
9daa114b1988MercedesOrange
Total:$76,524.00
66202d322008RenaultBlue
f104cea41978RenaultOrange
7e1fddd01985RenaultSilver
3aa04cfe1971RenaultSilver
061f557c1973RenaultGreen
Total:$93,297.00
8f0ec7a01998VolkswagenMaroon
49ecc4341985VolkswagenMaroon
bed2a8081972VolkswagenMaroon
924d6f7b1965VolkswagenWhite
Total:$25,249.00
8a2a10751979VolvoRed
029d04bd2007VolvoBlack
812051381996VolvoWhite
Total:$80,652.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.0.16 on Mojarra-2.2.8.