DataTable - SummaryRow

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

IdYearBrandColor
c08ab08d2004AudiMaroon
18b080551995AudiMaroon
6d3005ec1984AudiBlack
8d66e4de1993AudiSilver
c46b98211988AudiMaroon
b0a1f1891969AudiBlack
f42472271976AudiRed
Total:$56,324.00
272857951973BMWSilver
d98fe43a1963BMWBlue
552126091992BMWMaroon
3e05938e1996BMWGreen
Total:$60,129.00
4cdce47a1964FiatMaroon
fd0433591960FiatGreen
b9f261331972FiatWhite
557affb31993FiatBlack
Total:$858.00
febcc9be1984FordBrown
fc51a50d1995FordYellow
297b9d781962FordWhite
dbf379a71976FordMaroon
857fae4f2009FordBlack
da4b04661963FordSilver
Total:$86,257.00
271c249c1988HondaGreen
10da91c51995HondaBrown
a6aab0791973HondaYellow
e49c6b171983HondaBlue
0f50a6f41988HondaRed
Total:$99,421.00
ebc622c71988JaguarBrown
fa1af8301994JaguarSilver
6776b1bb1973JaguarOrange
4056918e1975JaguarBlack
b4917f1d2004JaguarBlack
Total:$46,838.00
e9b498f71981MercedesRed
d509201f1970MercedesYellow
33f2399b1981MercedesBlack
3d3dfcea2009MercedesSilver
b70c2e8f2006MercedesGreen
d325d1c51975MercedesYellow
92cd6b071990MercedesSilver
Total:$83,903.00
d03c76711988RenaultOrange
e7345c1d1960RenaultRed
28d4f7e01998RenaultBlue
b2a991e21993RenaultGreen
Total:$50,861.00
6ddc139d1991VolkswagenSilver
4f42a45e1988VolkswagenBlue
412a335d1985VolkswagenWhite
18639a171968VolkswagenBlue
Total:$73,054.00
3d0a18e71995VolvoBlack
c82f59b71985VolvoBlue
c18e8de41988VolvoWhite
cf78880e1966VolvoOrange
Total:$14,752.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>