DataTable - SummaryRow

SummaryRow is a helper component of datatable used for dynamic grouping.

IdYearBrandColor
d69d97881971AudiSilver
f2f4d2d31986AudiBlue
1f27e1892004AudiOrange
545c5f1e1963AudiWhite
4cbd1b501968AudiBlack
1b2573b02009AudiBlue
1f482c902008AudiOrange
Total:$10,276.00
892dfd252009BMWBlack
4ae64ee42007BMWBlack
30e4c96d1990BMWBlack
4fb40cb22001BMWMaroon
Total:$99,681.00
e7773b6e1971FiatSilver
17c290cd1989FiatWhite
388b26321963FiatRed
366027e31998FiatYellow
559e1ecd1991FiatMaroon
aa2074681982FiatBlue
Total:$85,171.00
4b6dd8d91995FordSilver
5e55417c1970FordBlue
dc4fec6b1994FordBlue
eed374c91992FordSilver
Total:$10,154.00
c82e73461979HondaOrange
db56bf181960HondaRed
65a3dc9f1964HondaWhite
Total:$97,624.00
da9d9d462003JaguarYellow
a05bc85a1960JaguarBrown
01484dee1993JaguarYellow
56c072131985JaguarRed
20b9c91e1981JaguarOrange
85bcc4bd2007JaguarOrange
a65c1ffa1988JaguarSilver
Total:$17,150.00
d886404b1998MercedesWhite
4f799a561986MercedesSilver
Total:$63,382.00
cbd996ee1992RenaultBlue
4ded676f1998RenaultSilver
37242f931997RenaultMaroon
085affd92009RenaultWhite
90bc09e21999RenaultBlue
7a7b43d21990RenaultSilver
c30d1fc21970RenaultOrange
Total:$45,011.00
137796361992VolkswagenSilver
f059ac471981VolkswagenMaroon
f18baf2c2005VolkswagenSilver
Total:$41,995.00
0cfb65651989VolvoBlue
ad8d4b512007VolvoMaroon
a20e57432004VolvoBlue
9e5fab951979VolvoSilver
35f44ea11998VolvoWhite
8e95abe42004VolvoOrange
9a6ce3791982VolvoBlack
Total:$80,108.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>