Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Add checkBox in Form

z sayari
9 years ago Jul 02, 2012 7:12am
Tobias Demuth
9 years ago Jul 02, 2012 2:49pm

Add an instance-variable to your underlying bean and then update your MyFieldFactory with some lines similar to the ones already there, returning a CheckBox when your new field is encountered.

if(property.getId().equals("nameOfYourBeanField")) {
    return new CheckBox();
}

That code hasn't been checked for correctness, maybe a method-name is wrong, but it should be enough to give you the overall idea ...

z sayari
9 years ago Jul 03, 2012 6:00am