DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
14365a0f1984AudiYellow
7650bddc1976AudiSilver
b81b79421974AudiRed
43cfc6701987AudiBlack
ec0838931992AudiGreen
5113da471971AudiBlue
71fef98c1983AudiYellow
5b31a7de1967AudiBrown
8d1224442001AudiBrown
Total:$75,007.00
afe5eb6f1987BMWBlue
651602321980BMWMaroon
d2c3153b2007BMWMaroon
Total:$16,484.00
5b55930d1977FiatBlue
ac19dea11966FiatOrange
63d727ad1985FiatMaroon
0e3cb2882003FiatBrown
c063f1652006FiatRed
70b536b31994FiatWhite
032cce232001FiatBlue
e51c46ca2002FiatWhite
Total:$32,316.00
1e01bdc21991FordBlack
53606d8c2003FordSilver
06acc7951970FordWhite
0c5fdf061998FordSilver
caae31221963FordGreen
e99a22061970FordWhite
Total:$49,427.00
6dd6afb71960HondaWhite
191d34b31972HondaMaroon
91f9c0ad1987HondaBlack
Total:$43,914.00
a34137431974JaguarMaroon
74e3d6801976JaguarRed
7b2e2ae41982JaguarRed
c633e6211962JaguarBlue
Total:$91,846.00
257f75171964MercedesSilver
Total:$64,045.00
5beeb2551975RenaultOrange
1c54e6671977RenaultGreen
58abb0eb1989RenaultYellow
67c4c8281996RenaultWhite
42efdad51963RenaultBrown
67a397a11982RenaultBlack
975249ad1994RenaultBrown
d1f4d72b1996RenaultWhite
fb247a7e2003RenaultSilver
58b13fc41969RenaultOrange
Total:$92,112.00
eaa52f442001VolkswagenOrange
f34db0e81982VolkswagenBrown
bfc9ffd21975VolkswagenBrown
2a8d7f1e1982VolkswagenWhite
Total:$32,347.00
d791b4fc1994VolvoWhite
8a860ef11962VolvoMaroon
Total:$73,685.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.1.4 on Mojarra-2.2.10.