Mirage LIVE PREVIEW

DataTable - SummaryRow

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

Documentation
IdYearBrandColor
254eeaa41961AudiBlack
7074d67a2007AudiYellow
6c5d3fbc1962AudiBlue
Total:$2,851.00
381b912f1992BMWYellow
52bb0b081991BMWSilver
da87b1111982BMWBlack
a12a2c611969BMWWhite
2f34ecd11979BMWGreen
903cab562000BMWMaroon
91031b391967BMWSilver
22b5ed0a1974BMWOrange
Total:$40,245.00
0e088d741974FiatSilver
844449371975FiatMaroon
Total:$29,131.00
f2389d551963FordYellow
a26715b11968FordBlue
181a86301961FordSilver
f7914fe61996FordGreen
e33d43c41995FordBlack
Total:$37,457.00
ab7cba421976HondaBlack
eeaf42911981HondaBlack
087e52231968HondaWhite
40d77f061984HondaBlue
ba4fc0ea1994HondaRed
Total:$87,521.00
9651bc061972JaguarBlack
67c4aa302008JaguarWhite
a57bb7c31999JaguarGreen
3657a1ed1996JaguarMaroon
00cbcfc21978JaguarYellow
b5ab54902004JaguarBlack
Total:$53,285.00
7ed387411973MercedesBrown
7f1f5acc1984MercedesOrange
041afbd41963MercedesBrown
b0ef46101973MercedesBrown
c2ab6a2b1996MercedesBrown
Total:$11,739.00
99d9194a1992RenaultRed
7987ce831961RenaultGreen
c23bf4151971RenaultBlue
68c8dc092003RenaultBrown
Total:$39,227.00
f65f2f7b1997VolkswagenSilver
625807091962VolkswagenRed
956b648e1971VolkswagenBrown
d4dedae41969VolkswagenGreen
5ac27a8a1972VolkswagenWhite
30556c4e2003VolkswagenBlack
cee5d48d1976VolkswagenBlue
Total:$10,893.00
244a9e8a1990VolvoMaroon
677f67851971VolvoMaroon
86578bf12008VolvoYellow
79b5d0fd1987VolvoBlack
9e23091f1997VolvoBlue
Total:$41,559.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>