Locale

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

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

PrimeOne Design

Saga Saga
Vela Vela
Arya Arya

Premium Themes

Premium themes are only available exclusively for PrimeFaces Theme Designer subscribers and therefore not included in PrimeFaces core.

bootstrap4-blue-light Bootstrap Blue
bootstrap4-purple-light Bootstrap Purple
bootstrap4-blue-dark Bootstrap Blue
bootstrap4-purple-dark Bootstrap Purple

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.

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
h456wer53BraceletAccessories73$15.0
h456wer53BraceletAccessories73$15.0
h456wer53BraceletAccessories73$15.0
cm230f032Gaming SetElectronics63$299.0
mnb5mb2m5Pink BandFitness63$79.0
2c42cb5cbPurple Gemstone NecklaceAccessories62$45.0
nvklal433Black WatchAccessories61$72.0
nvklal433Black WatchAccessories61$72.0
nbm5mv45nSneakersClothing52$78.0
nbm5mv45nSneakersClothing52$78.0
09zx9c0zcPainted Phone CaseAccessories41$56.0
09zx9c0zcPainted Phone CaseAccessories41$56.0
09zx9c0zcPainted Phone CaseAccessories41$56.0
09zx9c0zcPainted Phone CaseAccessories41$56.0
acvx872gcYellow EarbudsElectronics35$89.0
vb34btbg5Light Green T-ShirtClothing34$49.0
244wgerg2Blue T-ShirtClothing25$29.0
gwuby345vYoga SetFitness25$20.0
gwuby345vYoga SetFitness25$20.0
gwuby345vYoga SetFitness25$20.0
gwuby345vYoga SetFitness25$20.0
mbvjkgip5Galaxy EarringsAccessories23$34.0
mbvjkgip5Galaxy EarringsAccessories23$34.0
4920nnc2dGreen EarbudsElectronics23$89.0
4920nnc2dGreen EarbudsElectronics23$89.0
tx125ck42Yoga MatFitness15$20.0
tx125ck42Yoga MatFitness15$20.0
tx125ck42Yoga MatFitness15$20.0
k8l6j58jlLime BandFitness12$79.0
waas1x2asHeadphonesElectronics8$175.0
waas1x2asHeadphonesElectronics8$175.0
waas1x2asHeadphonesElectronics8$175.0
waas1x2asHeadphonesElectronics8$175.0
waas1x2asHeadphonesElectronics8$175.0
bib36pfvmChakra BraceletAccessories5$32.0
5k43kkk23Purple T-ShirtClothing2$49.0
5k43kkk23Purple T-ShirtClothing2$49.0
5k43kkk23Purple T-ShirtClothing2$49.0
vbb124btrGame ControllerElectronics2$99.0
zz21cz3c1Blue BandFitness2$79.0
r23fwf2w3Pink PurseAccessories0$110.0
r23fwf2w3Pink PurseAccessories0$110.0
av2231fwgBrown PurseAccessories0$120.0
av2231fwgBrown PurseAccessories0$120.0
av2231fwgBrown PurseAccessories0$120.0
av2231fwgBrown PurseAccessories0$120.0
fldsmn31bGrey T-ShirtClothing0$48.0
fldsmn31bGrey T-ShirtClothing0$48.0
lm2tny2k4ShoesClothing0$64.0
fldsmn31bGrey T-ShirtClothing0$48.0

<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}"/>
            </p:column>
        </p:dataTable>
    </div>
</h:form>