DataTable - SummaryRow

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

IdYearBrandColor
99a2cd102006AudiRed
166c25d81986AudiGreen
cd15528d1973AudiBlack
427ad9ed1980AudiGreen
61e63c0a1996AudiBlue
Total:$75,862.00
9a4d0d2f2000BMWBlue
b80740f61976BMWWhite
916439331990BMWBrown
Total:$67,576.00
35dc393e1968FiatGreen
73ef93471978FiatMaroon
21f2e5381984FiatOrange
Total:$60,321.00
12a78f342009FordGreen
1ad5b4871983FordBrown
1d24c6f31989FordRed
4d47b4ee2006FordBlue
7cd3d5201982FordSilver
89c5d0261966FordRed
Total:$57,443.00
250bbb7e1978HondaMaroon
eb78502b1979HondaBlue
45e7e8ee1981HondaWhite
7d80eebb2005HondaGreen
7ed1c1062008HondaBlue
d8e011021968HondaWhite
Total:$41,185.00
6572cdc11972JaguarBlack
70be5b1a1970JaguarBrown
f16b2fba1963JaguarRed
286bb2421965JaguarWhite
Total:$66,948.00
2eb80d141970MercedesWhite
33311f511963MercedesRed
ea7cc38d1993MercedesGreen
262631391965MercedesWhite
550bbc0c1987MercedesBlue
ca66d9582001MercedesYellow
0fe605371977MercedesYellow
5c077cb91987MercedesGreen
Total:$9,449.00
bcb663961998RenaultGreen
d64d10cd2006RenaultBlue
12b3bc831980RenaultRed
Total:$94,604.00
a4335f851963VolkswagenMaroon
de1e3a631987VolkswagenWhite
9c772b421986VolkswagenGreen
f5532e761982VolkswagenYellow
ce47eca61977VolkswagenWhite
ae5b78f62000VolkswagenRed
3744db161983VolkswagenGreen
cd4d44851962VolkswagenWhite
Total:$73,914.00
8a5563891988VolvoRed
de524de91980VolvoGreen
4c23c7b81974VolvoRed
c4e89eec1997VolvoBrown
Total:$64,202.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>