Skip to Main Content
Vaadin 7 UI Design By Example: Beginner's Guide
book

Vaadin 7 UI Design By Example: Beginner's Guide

by Alejandro Duarte
July 2013
Beginner content levelBeginner
246 pages
5h 3m
English
Packt Publishing
Content preview from Vaadin 7 UI Design By Example: Beginner's Guide

Time for action – binding data to properties

There's no better way to learn than practice. Follow these steps to see how binding works in real life:

  1. Create a new project named binding using your IDE. A Vaadin one, of course.
  2. Don't hesitate and delete all the content in the generated BindingUI class.
  3. Create a new local instance of TextField and turn immediate mode on:
      @Override
      protected void init(VaadinRequest request) {
        TextField textField = new TextField("Data");
        textField.setImmediate(true);
      }
  4. Create a new local instance of Label:
        Label label = new Label();
  5. Add the TextField and Label components to a new VerticalLayout and set it to be the content of the UI:
    VerticalLayout layout = new VerticalLayout(); layout.addComponent(textField); layout.addComponent(label); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Vaadin

Vaadin

Joachim Baumann, Daniel Arndt, Frank Engelen, Frank Hardy

Publisher Resources

ISBN: 9781782162261Other