DataTable - SummaryRow

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

IdYearBrandColor
edc0d6701983AudiOrange
ea82dbed2003AudiMaroon
e4608add1997AudiOrange
8823332a1990AudiOrange
63e1730a1960AudiBlack
58b984641970AudiBlack
f0c760e91972AudiMaroon
5d03bea21980AudiGreen
Total:$81,834.00
6f4c987f1983BMWOrange
777e68132007BMWBrown
55da62152008BMWBrown
d2c30a2b1986BMWGreen
866c32041962BMWMaroon
740f39ce2006BMWOrange
Total:$41,145.00
e3b21a791971FiatMaroon
d0b0d2a52001FiatMaroon
d403930c2004FiatBlue
0400512f1972FiatOrange
Total:$63,387.00
4b5d77992000FordBrown
0df9d1751990FordBlack
Total:$43,952.00
74ddbd9c1998HondaBlue
55f971361969HondaBrown
d025fdd71988HondaYellow
a90645131975HondaBlue
5d9ef30c2007HondaBrown
5c4828ce1978HondaBrown
66e55dbd1986HondaBrown
Total:$33,718.00
b0c701e51984JaguarBrown
fefb23b82009JaguarBlack
c66e7e8c2007JaguarRed
af163c722006JaguarMaroon
2f1cdca31989JaguarMaroon
ed5272e11961JaguarSilver
aaa2d09f1977JaguarRed
cebd6baf1977JaguarRed
Total:$84,721.00
03ee9cf21993MercedesWhite
d44316f11981MercedesSilver
92323fba2000MercedesBlack
8dcfc6901986MercedesWhite
ac35c2a01995MercedesBrown
b61538f71974MercedesGreen
Total:$92,764.00
6ad4ec571965RenaultOrange
2d6879b21977RenaultMaroon
67794bcf1988RenaultBlue
d39070871964RenaultRed
Total:$47,241.00
7ed70fe11971VolkswagenGreen
ab3058282004VolkswagenYellow
00629cd31992VolkswagenYellow
7df81a9b1970VolkswagenWhite
4480a6c31986VolkswagenBlack
Total:$39,911.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>