The following example from Rendering Components for Selecting Multiple Values shows how to use the h:selectManyCheckbox tag:
<h:selectManyCheckbox id="newsletters" layout="pageDirection" value="#{cashier.newsletters}"> <f:selectItems value="#{newsletters}"/> </h:selectManyCheckbox>
The value attribute of the f:selectItems tag is bound to the backing bean newsletters , which is configured in the application configuration resource file.
You can also create the list corresponding to a SelectMany or SelectOne component programmatically in the backing bean. See Writing Bean Properties for information on how to write a backing bean property corresponding to a SelectMany or SelectOne component.
The arguments to the SelectItem constructor are as follows:
An Object representing the value of the item
A String representing the label that displays in the SelectMany component on the page
A String representing the description of the item
SelectItems Properties describes in more detail how to write a backing bean property for a SelectItems component.