SelectManyButton

SelectManyButton is used to choose multiple items from a list using buttons.

Documentation
Font:
b
u
i
Selected:
No fonts selected
<h:form>
    <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
        <h:outputText value="Font:" />
        <p:selectManyButton value="#{selectManyView.selectedOptions}">
            <f:selectItem itemLabel="b" itemValue="b" />
            <f:selectItem itemLabel="u" itemValue="u" />
            <f:selectItem itemLabel="i" itemValue="i" />
        </p:selectManyButton>
        
        <p:commandButton value="Submit" update="display" icon="pi pi-check" />
        <p:spacer />
        
        <h:outputText value="Selected:" />
        <p:dataList id="display" value="#{selectManyView.selectedOptions}" var="font" emptyMessage="No fonts selected">
            <h:outputText value="#{font}" style="font-weight: bold" />
        </p:dataList>
    </h:panelGrid>
</h:form>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.