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.


To generate a handler stub in Jmix Studio, use the Handlers tab of the Jmix UI inspector panel or the Generate Handler action available in the top panel of the view class and through the CodeGenerate menu (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.