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

SelectCheckboxMenu

SelectCheckboxMenu is used to choose multiple items displayed in an overlay.

Basic
Multiple
    Grouped
      Advanced
        
        <div class="card">
            <h:form>
                <p:growl>
                    <p:autoUpdate/>
                </p:growl>
        
                <h5 class="mt-0">Basic</h5>
                <p:selectCheckboxMenu id="menu"
                                      dynamic="true"
                                      filter="true" filterMatchMode="startsWith"
                                      label="Cities" updateLabel="true"
                                      selectedLabel="Item(s) Selected"
                                      style="width: 15rem" panelStyle="width: 15rem" scrollHeight="250"
                                      value="#{checkboxView.selectedCities}">
                    <f:selectItems value="#{checkboxView.cities}"/>
        
                    <f:facet name="footer">
                        <p:divider styleClass="mt-0" />
                        <h:outputText value="XX cities"
                                      styleClass="py-1 block font-bold"/>
                    </f:facet>
                </p:selectCheckboxMenu>
        
                <h5>Multiple</h5>
                <p:selectCheckboxMenu id="multiple"
                                      filter="true" filterMatchMode="startsWith"
                                      multiple="true" emptyLabel="Please select..." updateLabel="true"
                                      style="min-width: 15rem" panelStyle="width: 30rem" scrollHeight="250"
                                      value="#{checkboxView.selectedCities2}">
                        <p:ajax event="itemSelect" listener="#{checkboxView.onItemSelect}"/>
                        <p:ajax event="itemUnselect" listener="#{checkboxView.onItemUnselect}"/>
                        <f:selectItems value="#{checkboxView.cities}"/>
                    </p:selectCheckboxMenu>
        
                <h5>Grouped</h5>
                <p:selectCheckboxMenu id="grouped"
                                      filter="true" filterMatchMode="startsWith"
                                      multiple="true"
                                      style="width: 15rem" panelStyle="width: 15rem" scrollHeight="250"
                                      value="#{checkboxView.selectedCountries}">
                    <f:selectItems value="#{checkboxView.countries}"/>
                </p:selectCheckboxMenu>
        
                <h5>Advanced</h5>
                <p:selectCheckboxMenu id="advanced"
                                      converter="#{countryConverter}"
                                      filter="true" filterMatchMode="startsWith" filterNormalize="true"
                                      multiple="true"
                                      scrollHeight="250"
                                      value="#{checkboxView.selectedCountries2}"
                                      var="c"
                                      style="min-width: 15rem">
                    <f:selectItems value="#{checkboxView.countries2}"/>
        
                    <p:column style="width:10%">
                        <span class="flag flag-#{c.code}" style="width: 30px; height: 20px"/>
                    </p:column>
        
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Name"/>
                        </f:facet>
                        <h:outputText value="#{c.name}"/>
                    </p:column>
        
                    <f:facet name="footer">
                        <h:outputText value="XX countries"
                                      styleClass="py-1 block font-bold"/>
                    </f:facet>
                </p:selectCheckboxMenu>
            </h:form>
        </div>