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 Sort

Sorting is enabled with field or sortBy expressions. Both single and multiple column sorting are supported.

Basic
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Basic (shorthand notation)
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
Default Sort
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
244wgerg2Blue T-ShirtClothing25
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63
zz21cz3c1Blue BandFitness2
Multiple Columns

Use metakey to add a column to the sort selection.

CodeNameCategoryQuantityPrice
250vm23ccGreen T-ShirtClothing74$49.00
h456wer53BraceletAccessories73$15.00
h456wer53BraceletAccessories73$15.00
h456wer53BraceletAccessories73$15.00
cm230f032Gaming SetElectronics63$299.00
cm230f032Gaming SetElectronics63$299.00
mnb5mb2m5Pink BandFitness63$79.00
mnb5mb2m5Pink BandFitness63$79.00
mnb5mb2m5Pink BandFitness63$79.00
2c42cb5cbPurple Gemstone NecklaceAccessories62$45.00
nbm5mv45nSneakersClothing52$78.00
nbm5mv45nSneakersClothing52$78.00
nbm5mv45nSneakersClothing52$78.00
v435nn85nMini SpeakersClothing42$85.00
acvx872gcYellow EarbudsElectronics35$89.00
acvx872gcYellow EarbudsElectronics35$89.00
vb34btbg5Light Green T-ShirtClothing34$49.00
vb34btbg5Light Green T-ShirtClothing34$49.00
244wgerg2Blue T-ShirtClothing25$29.00
244wgerg2Blue T-ShirtClothing25$29.00
f230fh0g3Bamboo WatchAccessories24$65.00
f230fh0g3Bamboo WatchAccessories24$65.00
f230fh0g3Bamboo WatchAccessories24$65.00
f230fh0g3Bamboo WatchAccessories24$65.00
4920nnc2dGreen EarbudsElectronics23$89.00
4920nnc2dGreen EarbudsElectronics23$89.00
4920nnc2dGreen EarbudsElectronics23$89.00
4920nnc2dGreen EarbudsElectronics23$89.00
4920nnc2dGreen EarbudsElectronics23$89.00
tx125ck42Yoga MatFitness15$20.00
tx125ck42Yoga MatFitness15$20.00
tx125ck42Yoga MatFitness15$20.00
tx125ck42Yoga MatFitness15$20.00
k8l6j58jlLime BandFitness12$79.00
pxpzczo23Purple BandFitness6$79.00
pxpzczo23Purple BandFitness6$79.00
pxpzczo23Purple BandFitness6$79.00
bib36pfvmChakra BraceletAccessories5$32.00
zx23zc42cTeal T-ShirtClothing3$49.00
5k43kkk23Purple T-ShirtClothing2$49.00
zz21cz3c1Blue BandFitness2$79.00
zz21cz3c1Blue BandFitness2$79.00
av2231fwgBrown PurseAccessories0$120.00
plb34234vGold Phone CaseAccessories0$24.00
plb34234vGold Phone CaseAccessories0$24.00
av2231fwgBrown PurseAccessories0$120.00
av2231fwgBrown PurseAccessories0$120.00
plb34234vGold Phone CaseAccessories0$24.00
fldsmn31bGrey T-ShirtClothing0$48.00
lm2tny2k4ShoesClothing0$64.00

<h:form>
    <div class="card">
        <h5>Basic</h5>
        <p:dataTable var="product" value="#{dtSortView.products1}" allowUnsorting="true" sortMode="single">
            <p:column sortBy="#{product.code}" headerText="Code">
                <h:outputText value="#{product.code}"/>
            </p:column>
            <p:column sortBy="#{product.name}" headerText="Name" sortOrder="asc">
                <h:outputText value="#{product.name}"/>
            </p:column>
            <p:column sortBy="#{product.category}" headerText="Category">
                <h:outputText value="#{product.category}"/>
            </p:column>
            <p:column sortBy="#{product.quantity}" headerText="Quantity">
                <h:outputText value="#{product.quantity}"/>
            </p:column>
        </p:dataTable>
    </div>
    <div class="card">
        <h5>Basic (shorthand notation)</h5>
        <p:dataTable var="product" value="#{dtSortView.products1}" allowUnsorting="true" sortMode="single">
            <p:column field="code" headerText="Code" filterable="false"/>
            <p:column field="name" headerText="Name" sortOrder="asc" filterable="false"/>
            <p:column field="category" headerText="Category" filterable="false"/>
            <p:column field="quantity" headerText="Quantity" filterable="false"/>
        </p:dataTable>
    </div>
    <div class="card">
        <h5>Default Sort</h5>
        <p:dataTable var="product" value="#{dtSortView.products2}" sortMode="multiple"
                     sortBy="#{dtSortView.sortBy}">
            <p:column field="code" headerText="Code" filterable="false"/>
            <p:column field="name" headerText="Name" filterable="false"/>
            <p:column field="category" headerText="Category" filterable="false"/>
            <p:column field="quantity" headerText="Quantity" filterable="false"/>
        </p:dataTable>
    </div>
    <div class="card">
        <h5>Multiple Columns</h5>
        <p>Use metakey to add a column to the sort selection.</p>

        <p:dataTable var="product" value="#{dtSortView.products3}" sortMode="multiple">
            <p:column headerText="Code" sortBy="#{product.code}">
                <h:outputText value="#{product.code}"/>
            </p:column>

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

            <p:column headerText="Category" sortBy="#{product.category}" sortOrder="asc" sortPriority="2">
                <h:outputText value="#{product.category}"/>
            </p:column>

            <p:column headerText="Quantity" sortBy="#{product.quantity}" sortOrder="desc" sortPriority="1">
                <h:outputText value="#{product.quantity}"/>
            </p:column>

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