RadioGroupΒΆ

/libs/granite/ui/components/foundation/form/radiogroup

A container to group a set of radio.

It has the following content structure:

granite:FormRadioGroup
idstring

The id attribute.

relstring

The class attribute. This is used to indicate the semantic relationship of the component similar to rel attribute.

classstring

The class attribute.

titlestring
i18n

The title attribute.

namestring

The name that identifies each radio when submitting the form.

requiredboolean

Indicates if the field is mandatory to be filled.

validationstring
multiple

The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

textstring
i18n

The label of the radio group.

verticalboolean

true to list the radios vertically; false otherwise.

renderReadOnlyboolean

Renders the read-only markup as well.

ignoreDataboolean

If false, the checked status is based on matching the form values by name and value properties. Otherwise, the form values are not matched, and the checked status is based on checked property specified by one of the radios.

The items of this component are specified using ItemDataSource.

Example:

+ myradiogroup
  - sling:resourceType = "granite/ui/components/foundation/form/radiogroup"
  + items
    + option1
      - sling:resourceType = "granite/ui/components/foundation/form/radio"
      - name = "browser"
      - value = "ie"
      - text = "Internet Explorer"
    + option2
      - sling:resourceType = "granite/ui/components/foundation/form/radio"
      - name = "browser"
      - value = "chrome"
      - text = "Chrome"
    + option3
      - sling:resourceType = "granite/ui/components/foundation/form/radio"
      - name = "browser"
      - value = "firefox"
      - text = "Firefox"