Locale

Language
English
English
English
French
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
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Free Themes

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

Saga Saga
Vela Vela
Arya Arya

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

DataTable RowExpansion

A row can be expanded to display detail content using a row expansion column and expansion facet.

Expand rows to see detailed information
Row TogglerNameImagePriceCategoryReviewsStatus
Bamboo Watch$65.00AccessoriesBamboo WatchINSTOCK
Black Watch$72.00AccessoriesBlack WatchINSTOCK
Blue Band$79.00FitnessBlue BandLOWSTOCK
Blue T-Shirt$29.00ClothingBlue T-ShirtINSTOCK
Bracelet$15.00AccessoriesBraceletINSTOCK
Brown Purse$120.00AccessoriesBrown PurseOUTOFSTOCK
Chakra Bracelet$32.00AccessoriesChakra BraceletLOWSTOCK
Galaxy Earrings$34.00AccessoriesGalaxy EarringsINSTOCK
Game Controller$99.00ElectronicsGame ControllerLOWSTOCK
Gaming Set$299.00ElectronicsGaming SetINSTOCK

<div class="card">
    <h:form>
        <p:dataTable var="product" value="#{dtBasicView.products}" rowKey="#{product.id}">
            <f:facet name="header">
                Expand rows to see detailed information
            </f:facet>
            <p:column style="width:2rem" ariaHeaderText="Row Toggler">
                <p:rowToggler/>
            </p:column>

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

            <p:column headerText="Image">
                <p:graphicImage name="demo/images/product/#{product.image}" styleClass="shadow-1" width="100"/>
            </p:column>

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

            <p:column headerText="Category">
                <h:outputText value="#{product.category}"/>
            </p:column>

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

            <p:column headerText="Status">
                <h:outputText value="#{product.inventoryStatus}"/>
            </p:column>

            <p:rowExpansion>
                <div class="product">
                    <div class="product-list-item">
                        <p:graphicImage name="demo/images/product/#{product.image}"/>
                        <div class="product-list-detail">
                            <div class="product-name">#{product.name}</div>
                            <div class="product-description">#{product.description}</div>
                            <p:rating readonly="true" value="#{product.rating}"/>
                            <i class="pi pi-tag product-category-icon"/><span
                                class="product-category">#{product.category}</span>
                        </div>
                        <div class="product-list-action">
                            <h:outputText value="#{product.price}" styleClass="product-price">
                                <f:convertNumber currencySymbol="$" type="currency"/>
                            </h:outputText>
                            <p:commandButton value="Add To Cart" icon="pi pi-shopping-cart" type="button"
                                             disabled="#{product.inventoryStatus == 'OUTOFSTOCK'}">
                            </p:commandButton>
                            <span class="product-badge status-#{product.inventoryStatus.statusName}">#{product.inventoryStatus.text}</span>
                        </div>
                    </div>
                </div>
            </p:rowExpansion>
        </p:dataTable>
    </h:form>
</div>