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 Add Row

A new row can be added by clicking the Add new button.

Row Editing with add functionality
CodeNameStatusPrice
4b3d1576
Bamboo Watch
INSTOCK
65.0
1ab3bb13
Black Watch
INSTOCK
72.0
3ddb6b0f
Blue Band
LOWSTOCK
79.0
3837b075
Blue T-Shirt
INSTOCK
29.0
9993f9aa
Bracelet
INSTOCK
15.0
7cb5bf5b
Brown Purse
OUTOFSTOCK
120.0
7c81c248
Chakra Bracelet
LOWSTOCK
32.0
baa7a494
Galaxy Earrings
INSTOCK
34.0
4c9ba6c6
Game Controller
LOWSTOCK
99.0
f70c7557
Gaming Set
INSTOCK
299.0
586c8399
Gold Phone Case
OUTOFSTOCK
24.0
974cc590
Green Earbuds
INSTOCK
89.0
4c483470
Green T-Shirt
INSTOCK
49.0
fbf9ad8d
Grey T-Shirt
OUTOFSTOCK
48.0
3484fdef
Headphones
LOWSTOCK
175.0

<div class="card">
    <h:form id="form">
        <p:growl id="msgs" showDetail="true"/>

        <p:dataTable id="products1" widgetVar="products1" var="product" value="#{dtAddRowView.products1}"
                     editable="true">
            <f:facet name="header">
                Row Editing with add functionality
            </f:facet>

            <p:ajax event="rowEdit" listener="#{dtAddRowView.onRowEdit}" update=":form:msgs"/>
            <p:ajax event="rowEditCancel" listener="#{dtAddRowView.onRowCancel}" update=":form:msgs"/>

            <p:column headerText="Code">
                <p:cellEditor>
                    <f:facet name="output"><h:outputText value="#{product.code}"/></f:facet>
                    <f:facet name="input"><p:inputText id="modelInput" value="#{product.code}"
                                                       style="width:100%"/></f:facet>
                </p:cellEditor>
            </p:column>

            <p:column headerText="Name">
                <p:cellEditor>
                    <f:facet name="output"><h:outputText value="#{product.name}"/></f:facet>
                    <f:facet name="input"><p:inputText value="#{product.name}" style="width:100%"
                                                       label="Name"/></f:facet>
                </p:cellEditor>
            </p:column>

            <p:column headerText="Status">
                <p:cellEditor>
                    <f:facet name="output"><h:outputText value="#{product.inventoryStatus}"/></f:facet>
                    <f:facet name="input">
                        <h:selectOneMenu value="#{product.inventoryStatus}" style="width:100%">
                            <f:selectItems value="#{dtEditView.inventoryStatusList}" var="status"
                                           itemLabel="#{status}" itemValue="#{status}"/>
                        </h:selectOneMenu>
                    </f:facet>
                </p:cellEditor>
            </p:column>

            <p:column headerText="Price">
                <p:cellEditor>
                    <f:facet name="output"><h:outputText value="#{product.price}"/></f:facet>
                    <f:facet name="input"><p:inputText value="#{product.price}" style="width:100%"
                                                       label="Price"/></f:facet>
                </p:cellEditor>
            </p:column>


            <p:column style="width:6rem">
                <p:rowEditor/>
            </p:column>
        </p:dataTable>

        <div class="grid mt-3">
            <div class="col-12">
                <p:commandButton value="Add new row" process="@this" update=":form:msgs"
                                 action="#{dtAddRowView.onAddNew()}" oncomplete="PF('products1').addRow();"/>
            </div>
        </div>

    </h:form>
</div>