Why does ADF Faces have both a Select Boolean Checkbox and a Select Many Checkbox?

When using JDeveloper you might have noticed that the ADF Faces Component Palette exposes both a Select Boolean Checkbox and a Select Many Checkbox Component.  Why do we need both?

checkboxPalette.png


Just as in Core JSF, there are two components to serve two different needs - af:selectBooleanCheckbox is a bit more cumbersome to use, but allows for greater flexibility with layout.  af:selectManyCheckbox is simpler to use, but has greater restrictions on layout.
 
af:selectBooleanCheckbox:
  • Each checkbox in your group is represented by a one-to-one mapping to a selectBooleanCheckbox component
  • The value of the selectBooleanCheckbox is a boolean, and we recommend you use the typesafe attribute "selected" instead of "value"
  • Since each checkbox is rendered individually, the app developer has great control over alignment.  For example, the app developer can create a UI like these two below using af:selectBooleanCheckbox

 

selectBooleanCheckbox1.png

SelectBooleanCheckbox components intermixed with other controls within a form

selectBooleanCheckbox2.png

A grid layout of eight selectBooleanCheckbox components

af:selectManyCheckbox component:

  • All checkboxes in the group are represented by one af:selectManyCheckbox component, which has af:selectItem, f:selectItems, or af:selectItems as its children.
  • The value of the af:selectManyCheckbox is a List of the selected values
  • The checkboxes can be laid out either all in one horizontal row or all in one vertical row, by using the "layout" attribute on af:selectManyCheckbox

 

 

 

 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

An exploration in the lighter side of ADF development.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today