DataTable - SummaryRow

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

IdYearBrandColor
304e20f61977AudiGreen
b942f5051987AudiRed
baca6fc61991AudiBlue
ca593e281989AudiGreen
Total:$34,714.00
0c91e7291977BMWBlue
2adeb5ae1990BMWGreen
39915c262001BMWGreen
09961edb1999BMWGreen
63e6ebe92007BMWSilver
f72601f91987BMWBlue
68d9cd4f2007BMWBlack
56d2ec1b2000BMWSilver
e40bcfb71962BMWRed
2bc8b02e1972BMWBrown
Total:$67,131.00
2808bc381968FiatRed
de84ac261999FiatOrange
f3e88dde1990FiatOrange
330927651966FiatYellow
9f8fd71e1997FiatBlue
Total:$30,771.00
46ccbe3b2007FordGreen
1018b1c91968FordGreen
919140ac1962FordRed
4aaf168c1977FordBrown
28ab9d1f1986FordGreen
4cc0e6422005FordWhite
Total:$90,833.00
570793a71974HondaGreen
540cde731967HondaWhite
06a52ae11967HondaSilver
edbeb8c71982HondaSilver
0d49cf852001HondaBlue
617dd2c01991HondaBlue
Total:$42,669.00
560158ae1994JaguarMaroon
bc66c4522007JaguarOrange
acf06fff1994JaguarRed
Total:$85,238.00
f01149691979MercedesSilver
da51f35c1995MercedesMaroon
68113f8a1967MercedesBlack
Total:$50,079.00
0c8b7b3b2006RenaultYellow
fa313b671990RenaultGreen
49e37d171978RenaultSilver
Total:$56,167.00
f7780c6d1974VolkswagenSilver
89d2186c2006VolkswagenBlue
e14756161972VolkswagenOrange
4e707a451990VolkswagenOrange
d121fbcc1995VolkswagenSilver
Total:$95,599.00
0d05c6bf1989VolvoSilver
b86492761969VolvoGreen
9904553f1972VolvoMaroon
16e20ea91967VolvoOrange
b85f4d312007VolvoBrown
Total:$5,218.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>