Locale

Change the locale of the datepicker, schedule and client side validation messages.

Language
English
English
English
French
German
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Themes

PrimeOne
Saga Saga
Vela Vela
Arya Arya
Bootstrap
bootstrap4-blue-light Bootstrap Blue
bootstrap4-purple-light Bootstrap Purple
bootstrap4-blue-dark Bootstrap Blue
bootstrap4-purple-dark Bootstrap Purple
Material Design
material-indigo-light Indigo
material-deeppurple-light' Deep Purple
material-indigo-dark Indigo
material-deeppurple-dark' Deep Purple
Material Design Compact
material-indigo-light Indigo
material-deeppurple-light' Deep Purple
material-indigo-dark Indigo
material-deeppurple-dark' Deep Purple

DataTable ColumnToggler

ColumnToggler is a helper component of datatable to toggle the visibility of columns.

List of Products
CodeNameCategoryQuantityPrice
f230fh0g3Bamboo WatchAccessories24$65.00
nvklal433Black WatchAccessories61$72.00
zz21cz3c1Blue BandFitness2$79.00
244wgerg2Blue T-ShirtClothing25$29.00
h456wer53BraceletAccessories73$15.00
av2231fwgBrown PurseAccessories0$120.00
bib36pfvmChakra BraceletAccessories5$32.00
mbvjkgip5Galaxy EarringsAccessories23$34.00
vbb124btrGame ControllerElectronics2$99.00
cm230f032Gaming SetElectronics63$299.00

<h:form>
<p:growl>
    <p:autoUpdate />
</p:growl>
<div class="card">
<div class="flex justify-content-between">
   <div>
   </div>
   <div>
      <p:commandButton value="XLSX" styleClass="mr-2 mb-2" >
          <p:dataExporter type="xlsxstream" target="products" fileName="visible" visibleOnly="true"/>
      </p:commandButton>

      <p:commandButton value="PDF" styleClass="mr-2 mb-2" >
          <p:dataExporter type="pdf" target="products" fileName="visible" visibleOnly="true"/>
      </p:commandButton>
   </div>
</div>
    <p:dataTable id="products" var="product" value="#{dtBasicView.products}">
        <f:facet name="header">
            <div class="flex justify-content-between align-items-center">
                List of Products

                <div>
                    <p:commandButton id="toggler" type="button" value="Columns" icon="pi pi-align-justify"/>
                    <p:columnToggler datasource="products" trigger="toggler">
                        <p:ajax event="toggle" listener="#{dtBasicView.onToggle}"/>
                    </p:columnToggler>
                </div>
            </div>
        </f:facet>

        <p:column ariaHeaderText="Code">
            <f:facet name="header">
                <h:outputText value="Code" title="Code"/>
            </f:facet>
            <h:outputText value="#{product.code}" />
        </p:column>

        <p:column headerText="Name">
            <h:outputText value="#{product.name}" />
        </p:column>

        <p:column headerText="Category">
            <h:outputText value="#{product.category}" />
        </p:column>

        <p:column headerText="Quantity" visible="false">
            <h:outputText value="#{product.quantity}" />
        </p:column>

        <p:column headerText="Price">
            <h:outputText value="#{product.price}">
                <f:convertNumber type="currency" currencySymbol="$"/>
            </h:outputText>
        </p:column>
    </p:dataTable>
</div>
</h:form>