SelectManyCheckbox

SelectCheckboxMenu is a multiselect input component based on checkboxes in an overlay menu.


Selected Movies
No records found.

Source

<h:form>

    <p:selectCheckboxMenu value="#{formBean.selectedMovies}" label="Movies" filter="true" filterText="Filter" filterMatchMode="startsWith" panelStyle="width:220px">
        <f:selectItems value="#{formBean.movies}" />
    </p:selectCheckboxMenu>

    <p:separator style="margin-bottom:10px"/>

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

    <p:dialog header="Selected Movies" modal="true" showEffect="fade" hideEffect="fade" widgetVar="dlg" resizable="false">
        <p:dataList id="display" value="#{formBean.selectedMovies}" var="movie">
            #{movie}
        </p:dataList>
    </p:dialog>

</h:form>