SelectOneButton

SelectOneButton is used to choose a single item from a list using buttons.

Documentation
Platform:
Xbox One
PS4
Wii U
Selected:
<h:form>
    <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
        <h:outputText value="Platform:" />
        <p:selectOneButton value="#{selectOneView.option}">
            <f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
            <f:selectItem itemLabel="PS4" itemValue="PS4" />
            <f:selectItem itemLabel="Wii U" itemValue="Wii U" />
        </p:selectOneButton>
        
        <p:commandButton value="Submit" update="display" icon="pi pi-check" />
        <p:spacer />
        
        <h:outputText value="Selected:" />
        <h:outputText id="display" value="#{selectOneView.option}" style="font-weight: bold" />
    </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.