(Quick Reference)
checkBox
Purpose
Adds a
CheckBox field of the parent container.
Examples
// Within a form
<v:form bean="${bookInstance}">
<v:checkBox name="bestseller">Bestseller</v:checkBox>
</v:form>// Standalone
<v:checkBox>My CheckBox</v:checkBox>
Description
The checkBox tag is a special type of
field tag, where the field component
is a Vaadin
CheckBox.
Body
- Contains the caption for the field
Attributes
Specific
name
(optional) The property name of the field
caption
(optional) The caption of the field. Overrides the body content.
onValueChange
(optional) Either a ValueChangeListener or a Closure that takes a ValueChangeEvent parameter.
Remember to set immediate="true"
if you want the ValueChangeEvent
to fire immediately when the user selects a new value.
General
var
(optional) Uses Grails's set tag to set the value of the specified variable to be this component.
class
(optional) The CSS class name to add to the component using the addStyleName() method
sizeUndefined
(optional) Calls setSizeUndefined() on the component. (Attribute value is ignored)
sizeFull
(optional) Calls setSizeFull() on the component. (Attribute value is ignored)
See Vaadin CheckBox API docs for full list of allowed attributes.