• Settings
    • 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
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      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
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

SelectManyCheckbox

SelectManyCheckbox is used to choose multiple items from a collection.

SelectManyCheckbox Tag Documentation

SelectManyCheckbox is an extended version of the standard Faces SelectManyCheckbox.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
accesskey String false Access key to transfer focus to the input element.
border int false 0
columns int false 12 Defines the number of columns in grid layout.
converter Converter false EL expression resolves to a converter instance or literal converter ID defining a component converter.
converterMessage String false
dir String false Direction indication for text that does not inherit directionality.
disabled boolean false false Specifies that an element should be disabled.
disabledClass String false
enabledClass String false
flex Boolean false Use modern FlexGrid CSS for this component.
hideNoSelectionOption boolean false false Flag indicating that, if this component is activated by the user, The "no selection option", if any, must be hidden.
immediate boolean false false When set true, process validations logic is executed at apply request values phase for this component.
label String false A localized user presentable name.
lang String false
layout String false
onblur String false Fires when an element loses focus.
onchange String false Fires when the value of an element has been changed.
onclick String false Fires when a mouse click on the element.
ondblclick String false Fires when a mouse double-click on the element.
onfocus String false Fires when an element gets focus.
onkeydown String false Fires when a user is pressing a key.
onkeypress String false Fires when a user presses a key.
onkeyup String false Fires when a user releases a key.
onmousedown String false Fires when a mouse button is pressed down on an element.
onmousemove String false Fires when the mouse pointer is moving while it is over an element.
onmouseout String false Fires when the mouse pointer moves out of an element.
onmouseover String false Fires when the mouse pointer moves onto an element.
onmouseup String false Fires when a mouse button is released over an element.
onselect String false
readonly boolean false false Specifies that an input field is read-only.
required boolean false false Marks component as required.
requiredMessage String false
role String false
selectedClass String false
style String false Specifies an inline CSS style for an element.
styleClass String false Specifies one or more CSS class names for an element.
submittedValue Object false
tabindex String false Specifies the tab order of an element.
title String false Specifies extra information about an element (displayed as a tooltip).
unselectedClass String false
validator Validator false A method expression referring to a method validating the input.
validatorMessage String false
value Object false Value of the component.
valueChangeListener ValueChangeListener false A method binding expression referring to a method for handling a valuchangeevent.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
Basic Layout
Responsive
Line Direction
Page Direction
Custom Layout
Grouped
European Countries
American Countries

Usage


<style>
    .grid-checkbox td {
        padding: .5rem;
    }
</style>

<div class="card">
    <h:form>
        <p:growl>
            <p:autoUpdate />
        </p:growl>
        
        <h5 style="margin-top:0px">Basic Layout</h5>
        <p:selectManyCheckbox id="basicAjax" value="#{checkboxView.selectedOptions}" widgetVar="blub">
            <p:ajax listener="#{checkboxView.selectedOptionsChanged}" />
            <f:selectItem itemLabel="Option 1" itemValue="Option 1"/>
            <f:selectItem itemLabel="Option 2" itemValue="Option 2"/>
            <f:selectItem itemLabel="Option 3" itemValue="Option 3"/>
        </p:selectManyCheckbox>
        
        <h5>Responsive</h5>
        <p:selectManyCheckbox id="grid2" value="#{checkboxView.selectedCities2}" layout="responsive"
                              columns="3">
            <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}"/>
        </p:selectManyCheckbox>

        <h5>Line Direction</h5>
        <p:selectManyCheckbox id="lineDirection" value="#{checkboxView.selectedCities}" layout="lineDirection">
            <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}"/>
        </p:selectManyCheckbox>
        
        <h5>Page Direction</h5>
        <p:selectManyCheckbox id="pageDirection" value="#{checkboxView.selectedCities}" layout="pageDirection">
            <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}"/>
        </p:selectManyCheckbox>

        <h5>Custom Layout</h5>
        <p:outputPanel id="customPanel">
            <p:selectManyCheckbox id="custom" value="#{checkboxView.selectedOptions2}" layout="custom">
                <p:ajax listener="#{checkboxView.selectedOptions2Changed}" />
                <f:selectItem itemLabel="Option 1" itemValue="Option 1"/>
                <f:selectItem itemLabel="Option 2" itemValue="Option 2"/>
                <f:selectItem itemLabel="Option 3" itemValue="Option 3"/>
            </p:selectManyCheckbox>

            <div class="grid text-center">
                <div class="col">
                    <p:outputLabel for="opt1" value="Option 1" styleClass="block mb-2"/>
                    <p:checkbox id="opt1" for="custom" itemIndex="0"/>
                </div>
                
                <div class="col">
                    <p:outputLabel for="opt2" value="Option 2" styleClass="block mb-2"/>
                    <p:checkbox id="opt2" for="custom" itemIndex="1"/>
                </div>

                <div class="col">
                    <p:outputLabel for="opt3" value="Option 3" styleClass="block mb-2"/>
                    <p:checkbox id="opt3" for="custom" itemIndex="2"/>
                </div>
            </div>
        </p:outputPanel>

        <h5>Grouped</h5>
        <p:selectManyCheckbox id="grid3" value="#{checkboxView.selectedCountries}" layout="pageDirection"
                              columns="1" styleClass="grid-checkbox">
            <f:selectItems value="#{checkboxView.countries}" var="country" itemLabel="#{country}"
                           itemValue="#{country}"/>
        </p:selectManyCheckbox>
    </h:form>
</div>