DataTable - SummaryRow

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

IdYearBrandColor
293ed7ab1985AudiRed
79c8ca511998AudiGreen
e6d130d01984AudiYellow
d63142d71974AudiGreen
88d24b9b1971AudiBlue
Total:$43,197.00
1d1d05ed2004BMWGreen
923a00011981BMWOrange
e474e9972002BMWSilver
fbade06e1974BMWBlack
Total:$46,756.00
4137bf532008FiatMaroon
230d04f12006FiatBlue
d7bbb93a2001FiatGreen
Total:$17,167.00
2add11ef1967FordBlack
34cc08511978FordMaroon
941251402008FordSilver
Total:$33,316.00
72818aa61974HondaSilver
e2471b4e2007HondaSilver
470cf5d92003HondaGreen
454259f81984HondaBlack
3d21edcc2009HondaSilver
14e5f6801978HondaWhite
f67b21491997HondaBrown
5add8fd61982HondaBrown
288c78bd1984HondaBlack
efe8c4d21968HondaGreen
Total:$74,030.00
2cc7861b1980JaguarBrown
98e57e041999JaguarOrange
57e4de851987JaguarWhite
0db0b76b2008JaguarWhite
e00b15b51991JaguarGreen
339930e91990JaguarWhite
207a82d11962JaguarOrange
ddcd01f92001JaguarMaroon
025d66a61996JaguarGreen
Total:$12,913.00
2cadabde1976MercedesBrown
379c152a2000MercedesSilver
06f2d49c1982MercedesSilver
212559351989MercedesSilver
e5ac19192008MercedesMaroon
Total:$53,019.00
6220e6291983RenaultWhite
ce3bc10a1991RenaultMaroon
Total:$15,139.00
af6095251960VolkswagenBlue
8a12a5021994VolkswagenBlue
1c1a60361996VolkswagenMaroon
6c8cfa621994VolkswagenGreen
Total:$43,020.00
c010804f1961VolvoSilver
c1f5bf991963VolvoWhite
406f0ea31979VolvoWhite
02e5827c1999VolvoYellow
c0ed6a411976VolvoMaroon
Total:$17,419.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>