aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/smoke/GridSmoke.java
blob: 37377460028d9d8bffee121b25e5a12827f9d1e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.vaadin.tests.smoke;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Button;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;

public class GridSmoke extends AbstractReindeerTestUI {

    @Override
    protected void setup(VaadinRequest request) {

        final Grid grid = new Grid();
        grid.setSelectionMode(SelectionMode.MULTI);
        grid.addColumn("firstName");
        grid.addColumn("age", Integer.class);

        grid.addRow("Lorem", Integer.valueOf(1));
        grid.addRow("Ipsum", Integer.valueOf(2));

        addComponent(grid);

        addComponent(new Button("Add new row",
                event -> grid.addRow("Dolor", Integer.valueOf(3))));
    }

}