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

DragDrop DataView

DragDrop components have special integration with data components. Drag the products using the headers to the drop area.

Bamboo Watch
Black Watch
Blue Band
Blue T-Shirt
Bracelet
Brown Purse
Chakra Bracelet
Galaxy Earrings
Game Controller
Selected Products
!!!Drop here!!!

<script>
    function handleDrop(event, ui) {
        var droppedProduct = ui.draggable;

        droppedProduct.fadeOut('fast');
    }
</script>

<div class="card">
    <h:form id="productForm">
        <p:dataView id="availableProducts" var="product" value="#{dndProductsView.products}" rows="9" layout="grid" gridIcon="pi pi-th-large" >
            <p:dataViewGridItem>
                <p:panel id="pnl" header="#{product.name}" style="text-align:center">
                    <h:panelGrid columns="1" style="width:100%">
                        <p:graphicImage name="/demo/images/product/#{product.image}"/>
                    </h:panelGrid>
                </p:panel>
    
                <p:draggable for="pnl" revert="true" handle=".ui-panel-titlebar" stack=".ui-panel"/>
            </p:dataViewGridItem>
        </p:dataView>
        
        <p:fieldset id="selectedProducts" legend="Selected Products" style="margin-top:20px">
            <p:outputPanel id="dropArea">
                <h:outputText value="!!!Drop here!!!" rendered="#{empty dndProductsView.droppedProducts}"
                              style="font-size:24px;"/>
                <p:dataTable id="selectedProductsTable" var="product" value="#{dndProductsView.droppedProducts}"
                             rendered="#{not empty dndProductsView.droppedProducts}">
                    <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:32px">
                        <p:commandButton update=":productForm:display" oncomplete="PF('productDialog').show()"
                                         icon="pi pi-search">
                            <f:setPropertyActionListener value="#{product}"
                                                         target="#{dndProductsView.selectedProduct}"/>
                        </p:commandButton>
                    </p:column>
                </p:dataTable>
            </p:outputPanel>
        </p:fieldset>

        <p:droppable for="selectedProducts" tolerance="pointer" activeStyleClass="ui-state-highlight"
                     datasource="availableProducts" onDrop="handleDrop">
            <p:ajax listener="#{dndProductsView.onProductDrop}" update="dropArea availableProducts"/>
        </p:droppable>

        <p:dialog header="Product Detail" widgetVar="productDialog" resizable="false" draggable="false"
                  showEffect="fade" hideEffect="fade" modal="true">
            <p:outputPanel id="display">
                <p:column rendered="#{not empty dndProductsView.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">#{dndProductsView.selectedProduct.category}</span>
                                </div>
                                <span class="product-badge status-#{dndProductsView.selectedProduct.inventoryStatus.name().toLowerCase()}">#{dndProductsView.selectedProduct.inventoryStatus.text}</span>
                            </div>
                            <div class="product-grid-item-content">
                                <p:graphicImage
                                        name="demo/images/product/#{dndProductsView.selectedProduct.image}"/>
                                <div class="product-name">#{dndProductsView.selectedProduct.name}</div>
                                <div class="product-description">#{dndProductsView.selectedProduct.description}</div>
                                <p:rating readonly="true" value="#{dndProductsView.selectedProduct.rating}"/>
                            </div>
                            <div class="product-grid-item-bottom">
                                <h:outputText value="#{dndProductsView.selectedProduct.price}"
                                              styleClass="product-price">
                                    <f:convertNumber currencySymbol="$" type="currency"/>
                                </h:outputText>
                                <p:commandButton value="Add To Cart" icon="pi pi-shopping-cart"
                                                 disabled="#{dndProductsView.selectedProduct.inventoryStatus == 'OUTOFSTOCK'}">
                                </p:commandButton>
                            </div>
                        </div>
                    </div>
                </p:column>
            </p:outputPanel>
        </p:dialog>
    </h:form>
</div>