SelectManyButton SelectManyButton is used to choose multiple items from a list using buttons.
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="ui-icon-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>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.0.12 on Mojarra-2.2.8.