O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Binding fields to a bean

As mentioned in the previous recipe, generating fields in forms can be done very quickly. However, it is not very flexible. In some cases, we need to change, for example, the caption or the order of the fields. Therefore, when we want to create flexible forms, we can create each field separately and then bind them with a bean. In this recipe, we will create the same form as in the previous recipe, but we will change the caption of the fields.

Binding fields to a bean

How to do it...

Carry out the following steps to create form fields bound to a Java Bean:

  1. Create a Vaadin project with a main UI class called Demo.
    public class Demo extends UI {…}
  2. We start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required