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
Bangla
Bosnian
Czech
Greek
Estonian
Persian
Finnish
Danish
Hindi
Indonesian
Icelandic
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
Uzbek
Vietnamese
Chinese
Chinese

Input Style

Themes

PrimeOne
Saga Blue Saga Blue
Vela Blue Vela Blue
Arya Blue Arya Blue
Bootstrap
Bootstrap Blue Light Bootstrap Blue Light
Bootstrap Purple Light Bootstrap Purple Light
Bootstrap Blue Dark Bootstrap Blue Dark
Bootstrap Purple Dark Bootstrap Purple Dark
Material Design
Material Indigo Light Material Indigo Light
Material Deep Purple Light Material Deep Purple Light
Material Indigo Dark Material Indigo Dark
Material Deep Purple Dark Material Deep Purple Dark
Material Design Compact
Material Compact Indigo Light Material Compact Indigo Light
Material Compact Deep Purple Light Material Compact Deep Purple Light
Material Compact Indigo Dark Material Compact Indigo Dark
Material Compact Deep Purple Dark Material Compact Deep Purple Dark
Legacy
Nova Light Nova Light
Nova Dark Nova Dark
Nova Colored Nova Colored
Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink

DataTable Selection

There are various ways to select rows from the datatable.

Basic
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Single with Row Click
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Select Events
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Multiple with Meta and Shift keys
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
RadioButton
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Checkbox
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73

<h:form id="form">
    <p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true"/>

    <div class="card">
        <h5>Basic</h5>
        <p:dataTable id="basicDT" var="product" value="#{dtSelectionView.products1}">
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
            
            <p:column style="width:3rem;text-align: center">
                <p:commandButton update=":form:productDetail" oncomplete="PF('productDialog').show()"
                                 icon="pi pi-search" title="View">
                    <f:setPropertyActionListener value="#{product}"
                                                 target="#{dtSelectionView.selectedProduct}"/>
                </p:commandButton>
            </p:column>
        </p:dataTable>
    </div>

    <div class="card">
        <h5>Single with Row Click</h5>
        <p:dataTable id="singleDT" var="product" value="#{dtSelectionView.products2}" selectionMode="single"
                     selection="#{dtSelectionView.selectedProduct}" rowKey="#{product.code}" cellNavigation="true">
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
            <f:facet name="footer">
                <p:commandButton process="singleDT" update=":form:productDetail" icon="pi pi-search"
                                 value="View"
                                 oncomplete="PF('productDialog').show()"/>
            </f:facet>
        </p:dataTable>
    </div>

    <div class="card">
        <h5>Select Events</h5>
        <p:dataTable id="eventsDT" var="product" value="#{dtSelectionView.products3}" selectionMode="single"
                     selection="#{dtSelectionView.selectedProduct}" rowKey="#{product.code}" cellNavigation="true">
            <p:ajax event="rowSelect" listener="#{dtSelectionView.onRowSelect}" update=":form:msgs"/>
            <p:ajax event="rowUnselect" listener="#{dtSelectionView.onRowUnselect}" update=":form:msgs"/>
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
        </p:dataTable>
    </div>

    <div class="card">
        <h5>Multiple with Meta and Shift keys</h5>
        <p:dataTable id="multipleDT" var="product" value="#{dtSelectionView.products4}" selectionMode="multiple"
                     selection="#{dtSelectionView.selectedProducts}" rowKey="#{product.code}" cellNavigation="true">
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
        </p:dataTable>
    </div>

    <div class="card">
        <h5>RadioButton</h5>
        <p:dataTable id="radioDT" var="product" value="#{dtSelectionView.products5}"
                     selection="#{dtSelectionView.selectedProduct}" rowKey="#{product.code}" cellNavigation="true">
            <p:column selectionBox="true" style="width:16px;text-align:center"/>
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
            <f:facet name="footer">
                <p:commandButton process="radioDT" update=":form:productDetail" icon="pi pi-search" value="View"
                                 oncomplete="PF('productDialog').show()"/>
            </f:facet>
        </p:dataTable>
    </div>

    <div class="card">
        <h5>Checkbox</h5>
        <p:dataTable id="checkboxDT" var="product" value="#{dtSelectionView.products6}"
                     selection="#{dtSelectionView.selectedProducts}" rowKey="#{product.code}"
                     style="margin-bottom:0" paginator="true" rows="5" selectionPageOnly="false" selectionRowMode="none" cellNavigation="true">
            <p:column selectionBox="true" style="width:16px;text-align:center"/>
            <p:column headerText="Code">
                <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">
                <h:outputText value="#{product.quantity}" />
            </p:column>
        </p:dataTable>
    </div>

    <p:dialog header="Product Info" widgetVar="productDialog" modal="true" showEffect="fade"
              hideEffect="fade" resizable="false">
        <p:outputPanel id="productDetail" style="text-align:center;">
            <p:column rendered="#{not empty dtSelectionView.selectedProduct}">
                <div class="product">
                    <div class="product-grid-item card" style="margin-bottom: 0">
                        <div class="product-grid-item-top">
                            <div>
                                <i class="pi pi-tag product-category-icon"/>
                                <span class="product-category">#{dtSelectionView.selectedProduct.category}</span>
                            </div>
                            <span class="product-badge status-#{dtSelectionView.selectedProduct.inventoryStatus.name().toLowerCase()}">#{dtSelectionView.selectedProduct.inventoryStatus.text}</span>
                        </div>
                        <div class="product-grid-item-content">
                            <p:graphicImage
                                    name="demo/images/product/#{dtSelectionView.selectedProduct.image}"/>
                            <div class="product-name">#{dtSelectionView.selectedProduct.name}</div>
                            <div class="product-description">#{dtSelectionView.selectedProduct.description}</div>
                            <p:rating readonly="true" value="#{dtSelectionView.selectedProduct.rating}"/>
                        </div>
                        <div class="product-grid-item-bottom">
                            <h:outputText value="#{dtSelectionView.selectedProduct.price}"
                                          styleClass="product-price">
                                <f:convertNumber currencySymbol="$" type="currency"/>
                            </h:outputText>
                            <p:commandButton value="Add To Cart" icon="pi pi-shopping-cart"
                                             disabled="#{dtSelectionView.selectedProduct.inventoryStatus == 'OUTOFSTOCK'}">
                                <f:setPropertyActionListener value="#{dtSelectionView.selectedProduct}"
                                                             target="#{dtSelectionView.selectedProduct}"/>
                            </p:commandButton>
                        </div>
                    </div>
                </div>
            </p:column>
        </p:outputPanel>
    </p:dialog>
</h:form>