Discovering selectBooleanCheckbox and selectManyCheckbox
selectBooleanCheckbox
and selectManyCheckbox
extend the default JSF components <h:selectBooleanCheckbox>
and <h:selectManyCheckbox>
respectively to provide skinning.
How to do it...
Basic definitions for selectBooleanCheckbox
and selectManyCheckbox
would be as follows:
<p:selectBooleanCheckbox value="#{selectCheckboxController.selectedValue}" /> <p:selectManyCheckbox value="#{selectCheckboxController.selectedCountries}"> <f:selectItem itemLabel="Turkey" itemValue="Turkey" /> <f:selectItem itemLabel="Germany" itemValue="Germany" /> <f:selectItem itemLabel="Switzerland" itemValue="Switzerland" /> </p:selectManyCheckbox>
Adding labels to the checkbox is easy with the itemLabel
attribute. itemLabel ...
Get PrimeFaces Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.