DataTable - SummaryRow SummaryRow is a helper component of datatable used for dynamic grouping.
IdYearBrandColor
3f5e0d071982AudiWhite
9262eae11975AudiRed
4f4c63821968AudiBrown
c25d02822005AudiYellow
c32dad0b2006AudiSilver
Total:$779.00
9ca68d1e1984BMWBlack
d58325f21984BMWWhite
ff4ae5172006BMWGreen
Total:$48,263.00
ac47c8c01991FiatMaroon
f5b0da421991FiatRed
4f9101f72000FiatSilver
843ea16e1986FiatBlack
86c15abe2000FiatBlack
04d911611973FiatYellow
12ae6bbd1970FiatMaroon
7698910e1992FiatOrange
Total:$35,265.00
4ff5f3861980FordSilver
d48637f62009FordBrown
09da68711977FordMaroon
b28fa6901972FordMaroon
8f58c4541976FordGreen
444bc8fb2000FordOrange
Total:$76,126.00
d970b8661988HondaRed
423ef6ea1977HondaBlue
43f92a952009HondaBlue
6e728aaf1987HondaBlack
6917e9be1963HondaOrange
Total:$56,075.00
332facb61996JaguarSilver
3dd6c1691992JaguarYellow
Total:$67,293.00
d325d7b62005MercedesSilver
1a6e5f242003MercedesRed
dcfa9afb2000MercedesBlue
a4f3bf2f1974MercedesOrange
59ebc5de1970MercedesWhite
Total:$21,241.00
23eb37ec2009RenaultBlack
dca3e1571983RenaultWhite
21265f231974RenaultBlue
14b839941999RenaultWhite
d37b059d1990RenaultWhite
Total:$48,031.00
ffa018ea1993VolkswagenYellow
f82503091977VolkswagenRed
6ffdaa421982VolkswagenWhite
82e198a71985VolkswagenBrown
18eca4251974VolkswagenMaroon
Total:$74,718.00
0f80d4491994VolvoWhite
65283ff01967VolvoGreen
4f4cc84b1976VolvoRed
e67a91711984VolvoWhite
e7968ed91968VolvoBrown
1bbb55d02003VolvoRed
Total:$68,650.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.RC1 on Mojarra-2.3.2.