SelectBooleanCheckbox

SelectBooleanCheckbox extends standard SelectBooleanCheckbox with skinning capabilities.

Basic Usage:
Ajax Behavior:
Selected Values
Value 1: false
Value 2: false

Source

<h:form>

    <p:growl id="msg" />

    <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">

        <h:outputText value="Basic Usage: " />
        <p:selectBooleanCheckbox value="#{formBean.value1}" />

        <h:outputText value="Ajax Behavior: " />
        <p:selectBooleanCheckbox value="#{formBean.value2}">
            <p:ajax update="msg" listener="#{formBean.addMessage}"/>
        </p:selectBooleanCheckbox>

    </h:panelGrid>

    <p:commandButton value="Submit" update="display" oncomplete="PF('dlg').show()" />

    <p:dialog header="Selected Values" modal="true" showEffect="fade" hideEffect="fade" widgetVar="dlg">
        <h:panelGrid columns="1" id="display">
            <h:outputText value="Value 1: #{formBean.value1}" />

            <h:outputText value="Value 2: #{formBean.value2}" />
        </h:panelGrid>
    </p:dialog>

</h:form>