| |
|
| java.lang.Object org.apache.cocoon.forms.formmodel.AbstractWidget org.apache.cocoon.forms.formmodel.BooleanField
BooleanField | public class BooleanField extends AbstractWidget implements ValidationErrorAware,ValueChangedListenerEnabled(Code) | | 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 479296 2006-11-26 06:28:51Z antonio $ |
addValueChangedListener | public void addValueChangedListener(ValueChangedListener listener)(Code) | | Adds a ValueChangedListener to this widget instance. Listeners defined
on the widget instance will be executed in addtion to any listeners
that might have been defined in the widget definition.
|
getXMLElementName | public String getXMLElementName()(Code) | | "booleanfield" |
hasValueChangedListeners | public boolean hasValueChangedListeners()(Code) | | |
initialize | public void initialize()(Code) | | |
setValidationError | public void setValidationError(ValidationError error)(Code) | | Set a validation error on this field. This allows fields to be externally marked as invalid by
application logic.
Parameters: error - the validation error |
setValue | public void setValue(Object object)(Code) | | Sets value of the field. If value is null, it is considered to be false
(see class comment).
|
Fields inherited from org.apache.cocoon.forms.formmodel.AbstractWidget | protected boolean wasValid(Code)(Java Doc)
|
|
|
|