DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
fd35efdc2005AudiYellow
5ff22afb1987AudiWhite
70e72f4b2004AudiRed
Total:$27,665.00
52cf40d11992BMWYellow
140e4bbe1969BMWYellow
541aaed22007BMWSilver
038c34f41979BMWGreen
2126ee121965BMWWhite
440cd68b1971BMWWhite
34667c312008BMWYellow
45bdac831969BMWBrown
539651ce1967BMWBlue
ebd53d551980BMWSilver
c7371e7b1989BMWBlack
Total:$41,633.00
bd85799a1962FiatBrown
247862fa1988FiatBlue
dad363061978FiatMaroon
Total:$48,759.00
554d77531981FordMaroon
2e6773b41961FordYellow
289260cf1984FordBlack
c89995dc1981FordGreen
5c395d501986FordWhite
3eb4ffb51999FordWhite
735f3aad1979FordBlack
0a0693981963FordBlack
Total:$39,402.00
c192ca471996HondaOrange
f588150f1986HondaMaroon
c639dfd32007HondaGreen
2e4883d91967HondaRed
a16acd041971HondaBlack
Total:$21,836.00
9703f4811997JaguarBrown
02c505f81965JaguarWhite
a628c0611996JaguarWhite
6ff700461992JaguarWhite
f6bb5d3a1986JaguarGreen
761694331963JaguarWhite
eb5629c91991JaguarMaroon
Total:$49,324.00
09cac6331990MercedesRed
1df327391992MercedesBrown
9e118b821965MercedesRed
Total:$80,434.00
4f1b54e61998RenaultWhite
2e79a4172001RenaultMaroon
2416361b1963RenaultYellow
3af7d7ae1982RenaultWhite
71abf2e01990RenaultSilver
Total:$47,416.00
2bbda0ef1984VolkswagenGreen
36033bfd1965VolkswagenBlue
0a6f8b221968VolkswagenBlue
Total:$69,643.00
6c48eb5a1990VolvoGreen
e813ee5a1998VolvoWhite
Total:$34,301.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.3-SNAPSHOT on Mojarra-2.3.2.