SelectManyCheckbox

SelectManyCheckbox extends standard SelectManyCheckbox with skinning capabilities.

Line Direction
Page Direction:
Grid:

Selected Values
No records found.
No records found.
No records found.

Source

<h:form>

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

        <h:outputText value="Line Direction: " />
        <p:selectManyCheckbox id="lineDirection" value="#{formBean.selectedOptions}">
            <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>

        <h:outputText value="Page Direction: " />
        <p:selectManyCheckbox id="pageDirection" value="#{formBean.selectedOptions2}"
            layout="pageDirection">
            <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>

        <h:outputText value="Grid: " />
        <p:selectManyCheckbox id="grid" value="#{formBean.selectedMovies}" layout="grid" columns="3">
            <f:selectItems value="#{formBean.movies}"/>
        </p:selectManyCheckbox>

    </h:panelGrid>

    <p:separator />

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

    <p:dialog header="Selected Values" modal="true" showEffect="fade" hideEffect="fade" widgetVar="dlg">
        <p:outputPanel id="display">
            <p:dataList value="#{formBean.selectedOptions}" var="option">
                #{option}
            </p:dataList>

            <p:dataList value="#{formBean.selectedOptions2}" var="option2">
                #{option2}
            </p:dataList>

            <p:dataList value="#{formBean.selectedMovies}" var="movie">
                #{movie}
            </p:dataList>
        </p:outputPanel>
    </p:dialog>

</h:form>