| A widget to select a boolean value. Usually rendered as a checkbox.
You may wonder why we don't use a
Field widget with an associated
Boolean Datatype instead. The reason is that many of the features of the Field
widget are overkill for a Boolean: validation is unnecessary (if the field is
not true it is false), the selectionlist associated with a Datatype also
has no purpose here (there would always be only 2 choices: true or false),
and the manner in which the request parameter of this widget is interpreted
is different (missing or empty request parameter means 'false', rather than null value).
version: $Id: BooleanField.java 433543 2006-08-22 06:22:54Z crossley $ |