Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to connect Options Group to mysql database for storing information?
I am using OptionsGroup for star rating so to store the info in mysql table
OptionGroup group = new OptionGroup(" Star Rating");
group.addItem("1 star");
group.addItem("2 star");
group.addItem("3 star");
group.addItem("4 star");
group.addItem("5 star");
group.addStyleName("horizontal");
group.setSizeUndefined();
rightTopForm.addComponent(group);
How can i add listner to above so that on clicking info i can store the same in mysql.
Hi, you can add a ValueChangeListener like the following:
group.addValueChangeListener(e -> {
// your logic here
});
Also, you may need to make the OptionGroup immediate:
group.setImmediate(true);