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 – my first table

Following are the steps to create your first table:

  1. Create a new Vaadin project named my-first-table using your IDE.
  2. Edit your UI class to match the following code snippet:
    public class MyFirstTableUI extends UI {
    
      protected void init(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);
      }
    }
  3. Now, add the actual code for the table shown as follows:
    public class MyFirstTableUI extends UI {
    
      protected void init(VaadinRequest request) {
    
        // ...
    
        Table table = new Table();
    
        table.addContainerProperty("Column 1", String.class,
    "(default 1)");
        table.addContainerProperty("Column 2", String.class,
    "(default 2)");
    
        table.addItem(new Object[] { "Hi", "There" }, "item ...
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