radioButtonGroup allows users to select a single value from a list of options using radio buttons.

  • XML element: radioButtonGroup

  • Java class: JmixRadioButtonGroup


The simplest case of using radioButtonGroup is to select an enumeration value for an entity attribute.

radio button group basics
    <instance class="" id="userDc">
        <fetchPlan extends="_base"/>
        <loader id="userDl"/>
    <radioButtonGroup dataContainer="userDc"
                      label="Select the onboarding status"/>

In the example above, the User entity has the onboardingStatus attribute of the OnboardingStatus type, which is an enumeration.


Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню CodeGenerate (Alt+Insert / Cmd+N).


itemEnabledProvider is applied to each item of this radioButtonGroup to determine whether the item should be enabled (true) or disabled (false). Disabled items are displayed as grayed out and the user cannot select them. All the items are enabled by default.

@Install(to = "radioButtonGroup", subject = "itemEnabledProvider")
private boolean radioButtonGroupItemEnabledProvider(OnboardingStatus onboardingStatus) {
    if (onboardingStatus != null) {
        return onboardingStatus.getId() != 30;
    return true;


See Also

See the Vaadin Docs for more information.