Reset RadioButtonGroup


Is there a way to reset a RadioButtonGroup? In other words, programatically unselect the user choice.

I tried clear() and setSelectedItem(null) without success (the UI always shows the selection).


Hi JC,

trying Vaadin Framework 8.0.6 and the following code:

package com.example.myapplication;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Button;
import com.vaadin.ui.RadioButtonGroup;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

 * This UI is the application entry point. A UI may either represent a browser window
 * (or tab) or some part of a html page where a Vaadin application is embedded.
 * <p>
 * The UI is initialized using {@link #init(VaadinRequest)}. This method is intended to be
 * overridden to add component to the user interface and initialize non-component functionality.
public class MyUI extends UI {

    protected void init(VaadinRequest vaadinRequest) {
        final VerticalLayout layout = new VerticalLayout();
        final TextField name = new TextField();
        name.setCaption("Type your name here:");

        final RadioButtonGroup<String> single = new RadioButtonGroup<>("Single Selection");
        single.setItems("Single", "Sola", "Yksi");
        Button button = new Button("Click Me");
        button.addClickListener(e -> {
        layout.addComponents(name, button, single);


    @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
    @VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
    public static class MyUIServlet extends VaadinServlet {

I think you have a valid point.

Select Yksi, press button:


Press button:

but the graphical representation stays at “Yksi”.

Let’s make this a bug:

Thank you + Best Regards,

Thx for the follow-up