Tobago Demo

Menu

Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta
Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta

Multi Checkbox

With <tc:selectManyCheckbox/>, you can create a group of checkboxes. The items are added via <tc:selectItem/> for static entries or <tc:selectItems value="#{controller.list}"/> for entries from a controller.

Tag Library Documentation: <tc:selectManyCheckbox/> | <tc:selectItem/> | <tc:selectItems/>

Basics

Checkbox Group with two items. The second one is disabled.

<tc:selectManyCheckbox label="Checkbox Group">

Inline

To display the radio buttons horizontally use the inline="true" attribute.

Images

Simple Usage

Select an animal. The selection is shown in the output field, after pressing 'Submit'.

<tc:selectManyCheckbox label="Checkbox Group" value="#{selectManyCheckboxController.animals}"> save the selected value in the controller. The available items are added with <tc:selectItem .../>. The <tc:out ... value="#{selectManyCheckboxController.animal}"/> get the value from the controller.

Ajax

Select a number. Those numbers are added and displayed in the <tc:out id="resultOutput" .../>. <tc:selectManyCheckbox .../> contain a <f:ajax render="resultOutput"/>, which rerenders the output field after check/uncheck a checkbox.

0

Free layout with <tc:selectReference>

Attanion! The <tc:selectReference> currently works only, when the referenced component <tc:selectManyCheckbox> has set labelLayout="skip".

First and second giant planets:
Discovered 1781:
Discovered 1846:
Selected:

Free layout with group attribute (JSF HTML tags - since JSF 2.3)

Attention! This example is only temporary for testing purpose. Does not currently work with Mojarra or MyFaces, but for different reasons.

© 2005-2025 Apache Software Foundation, Licensed under the Apache License, Version 2.0.