JARCH SHOWCASE
JARCH SHOWCASE
DataTable - ColumnToggler ColumnToggler is a helper component of datatable to toggle the visibility of columns.
List of Cars
IdYearBrandColorPrice
224e57711970AudiOrange$ 85.967,00
1ea479271987FiatBrown$ 2.214,00
a5f942d81972JaguarMaroon$ 93.128,00
728ba3d21974HondaBlue$ 57.853,00
40dedb081978VolkswagenRed$ 7.872,00
4967c2831990VolkswagenWhite$ 23.322,00
9bd3332a1982VolvoMaroon$ 46.875,00
391307891978HondaGreen$ 76.754,00
70038f131997FordRed$ 25.874,00
036efcd81993BMWRed$ 85.030,00
<a:dataTable id="cars" var="car" value="#{dtBasicView.cars}">
    <f:facet name="header">
        List of Cars

        <a:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
        <a:columnToggler datasource="cars" trigger="toggler" />
    </f:facet>

    <a:column headerText="Id">
        <h:outputText value="#{car.id}" />
    </a:column>

    <a:column headerText="Year">
        <h:outputText value="#{car.year}" />
    </a:column>

    <a:column headerText="Brand">
        <h:outputText value="#{car.brand}" />
    </a:column>

    <a:column headerText="Color">
        <h:outputText value="#{car.color}" />
    </a:column>

    <a:column headerText="Price">
        <h:outputText value="#{car.price}">
            <f:convertNumber type="currency" currencySymbol="$" />
        </h:outputText>
    </a:column>
</a:dataTable>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.