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 ContextMenu

ContextMenu has special integration with DataTable.

RightClick to View Options
CodeNameCategoryQuantity
f230fh0g3Bamboo WatchAccessories24
nvklal433Black WatchAccessories61
zz21cz3c1Blue BandFitness2
244wgerg2Blue T-ShirtClothing25
h456wer53BraceletAccessories73
av2231fwgBrown PurseAccessories0
bib36pfvmChakra BraceletAccessories5
mbvjkgip5Galaxy EarringsAccessories23
vbb124btrGame ControllerElectronics2
cm230f032Gaming SetElectronics63

<div class="card">
    <h:form id="form">
        <p:dataTable id="products" var="product" value="#{dtContextMenuView.products}" rowKey="#{product.id}"
                     selection="#{dtContextMenuView.selectedProduct}" selectionMode="single">
            <f:facet name="header">
                RightClick to View Options
            </f:facet>

            <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:dataTable>

        <p:contextMenu for="products">
            <p:menuitem value="View" update="productDetail" icon="pi pi-search"
                        oncomplete="PF('productDialog').show()" actionListener="#{dtContextMenuView.viewProduct}"/>
            <p:menuitem value="Delete" update="products" icon="pi pi-times"
                        action="#{dtContextMenuView.deleteProduct}"/>
        </p:contextMenu>

        <p:dialog header="Product Info" widgetVar="productDialog" modal="true" showEffect="fade"
                  hideEffect="fade" resizable="false">
            <p:outputPanel id="productDetail" style="text-align:center;">
                <p:column rendered="#{not empty dtContextMenuView.selectedProduct}">
                    <div class="product">
                        <div class="product-grid-item border-0" style="margin-bottom: 0">
                            <div class="product-grid-item-top">
                                <div>
                                    <i class="pi pi-tag product-category-icon"/>
                                    <span class="product-category">#{dtContextMenuView.selectedProduct.category}</span>
                                </div>
                                <span class="product-badge status-#{dtContextMenuView.selectedProduct.inventoryStatus.statusName}">#{dtContextMenuView.selectedProduct.inventoryStatus.text}</span>
                            </div>
                            <div class="product-grid-item-content">
                                <p:graphicImage
                                        name="demo/images/product/#{dtContextMenuView.selectedProduct.image}"/>
                                <div class="product-name">#{dtContextMenuView.selectedProduct.name}</div>
                                <div class="product-description">#{dtContextMenuView.selectedProduct.description}</div>
                                <p:rating readonly="true" value="#{dtContextMenuView.selectedProduct.rating}"/>
                            </div>
                            <div class="product-grid-item-bottom">
                                <h:outputText value="#{dtContextMenuView.selectedProduct.price}"
                                              styleClass="product-price">
                                    <f:convertNumber currencySymbol="$" type="currency"/>
                                </h:outputText>
                                <p:commandButton type="button" value="Add To Cart"
                                                 icon="pi pi-shopping-cart"
                                                 disabled="#{dtContextMenuView.selectedProduct.inventoryStatus == 'OUTOFSTOCK'}">
                                </p:commandButton>
                            </div>
                        </div>
                    </div>
                </p:column>
            </p:outputPanel>
        </p:dialog>
    </h:form>
</div>