checkgroup.formwidget
In XUL, no
element named <checkgroup
exists
(and it wouldn't be usefull). With formwidgets,
<checkgroup
is an element that extends
xul:box.
A <checkgroup class="formwidget"
is very much like a radiogroup
.
It should only contain checkboxes, as direct children.
These checkboxes may have a value
attribute.
The checkgroup holds the name, the checkboxes hold the
labels and value.
If a checkbox has no value, it's label is used as value.
When seeding, if the name of the checkgroup matches the
name of a seed, it will look for checkboxes with the same
value as the seed. If one is found, it is checked. If none are
found, a checkbox with the seeds label and value is appended
and checked.
Example:
Additional Attributes:
name
The name of the widget. Used as the name of the variable in CGI
-
onvalidate
pseudo event handler. should point to a method to execute
for validation. when validating, the method will receive a bucket
with a single seed in it, reflecting the name, value and label of this
element.
Additional Methods:
-
appendItem(value,label,checked)
Appends a checkbox to the group, with the appropraite attributes.
-
removeItem(xulelement)
Removes the given xulelement from the checkgroup.
-
harvest()
See harvest and seed
-
seed()
See harvest and seed
-
validate()
executes the method specified in onvalidate