JARCH SHOWCASE
JARCH SHOWCASE
SelectManyCheckbox SelectManyCheckbox is used to choose multiple items from a collection.

Basic Layout

Grid Layout

Responsive

Custom Layout

Grouped


Values
Basic
Nenhum registro encontrado.
Grid
Nenhum registro encontrado.
Grid
Nenhum registro encontrado.
Custom
Nenhum registro encontrado.
Cars
Nenhum registro encontrado.
<a:form>
    <h3 style="margin-top:0px">Basic Layout</h3>
    <a:selectManyCheckbox id="basic" value="#{checkboxView.selectedConsoles}">
        <f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
        <f:selectItem itemLabel="PS4" itemValue="PS4" />
        <f:selectItem itemLabel="Wii U" itemValue="Wii U" />
    </a:selectManyCheckbox>

    <h3>Grid Layout</h3>
    <a:selectManyCheckbox id="grid" value="#{checkboxView.selectedCities}" layout="grid" columns="3">
        <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}" />
    </a:selectManyCheckbox>

    <h3>Responsive</h3>
    <a:selectManyCheckbox id="grid2" value="#{checkboxView.selectedCities2}" layout="responsive" columns="3">
        <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}" />
    </a:selectManyCheckbox>

    <h3>Custom Layout</h3>
    <a:outputPanel id="customPanel" style="margin-bottom:20px">
        <a:selectManyCheckbox id="custom" value="#{checkboxView.selectedConsoles2}" layout="custom">
            <f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
            <f:selectItem itemLabel="PS4" itemValue="PS4" />
            <f:selectItem itemLabel="Wii U" itemValue="Wii U" />
        </a:selectManyCheckbox>

        <div class="ui-grid ui-grid-responsive">
            <div class="ui-grid-row">
                <div class="ui-grid-col-4" style="text-align:center">
                    <h:outputLabel for="opt1" value="Xbox One" style="display:block;margin-bottom:8px"/>
                    <a:checkbox id="opt1" for="custom" itemIndex="0" />
                </div>
                <div class="ui-grid-col-4" style="text-align:center">
                    <h:outputLabel for="opt2" value="PS4" style="display:block;margin-bottom:8px"/>
                    <a:checkbox id="opt2" for="custom" itemIndex="1" />
                </div>
                <div class="ui-grid-col-4" style="text-align:center">
                    <h:outputLabel for="opt3" value="Wii U" style="display:block;margin-bottom:8px"/>
                    <a:checkbox id="opt3" for="custom" itemIndex="2" />
                </div>
            </div>
        </div>
    </a:outputPanel>

    <h3>Grouped</h3>
    <a:selectManyCheckbox id="grid3" value="#{checkboxView.selectedCars}" layout="pageDirection" columns="1">
        <f:selectItems value="#{checkboxView.cars}" var="car" itemLabel="#{car}" itemValue="#{car}" />
    </a:selectManyCheckbox>

    <a:separator />

    <a:commandButton value="Submit" update="display" oncomplete="PF('dlg').show()" icon="ui-icon-check" />

    <a:dialog header="Values" modal="true" showEffect="clip" widgetVar="dlg" resizable="false">
        <a:outputPanel id="display">
            <a:dataList value="#{checkboxView.selectedConsoles}" var="console">
                <f:facet name="header">
                    Basic
                </f:facet>
                #{console}
            </a:dataList>
            <a:dataList value="#{checkboxView.selectedCities}" var="city">
                <f:facet name="header">
                    Grid
                </f:facet>
                #{city}
            </a:dataList>
            <a:dataList value="#{checkboxView.selectedCities2}" var="city">
                <f:facet name="header">
                    Grid
                </f:facet>
                #{city}
            </a:dataList>
            <a:dataList value="#{checkboxView.selectedConsoles2}" var="console">
                <f:facet name="header">
                    Custom
                </f:facet>
                #{console}
            </a:dataList>
            <a:dataList value="#{checkboxView.selectedCars}" var="car">
                <f:facet name="header">
                    Cars
                </f:facet>
                #{car}
            </a:dataList>
        </a:outputPanel>
    </a:dialog>
</a:form>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.