aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/table/TableLastRowMissing.java
blob: 18d13e676b4503f1682c5080da293f1b39053a71 (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
29
30
31
32
33
34
35
package com.vaadin.tests.components.table;

import com.vaadin.data.Item;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;

public class TableLastRowMissing extends TestBase {

    @Override
    protected String getDescription() {
        return "The table below should display 3 rows. Each with a textfield containing the row number.";
    }

    @Override
    protected Integer getTicketNumber() {
        return 2933;
    }

    @Override
    protected void setup() {
        Table t = new Table();
        addComponent(t);

        t.addContainerProperty("Name", TextField.class, null);

        for (int i = 0; i < 3; i++) {
            Item item = t.addItem(i);
            TextField tf = new TextField("", String.valueOf(i + 1));
            tf.setColumns(10);
            item.getItemProperty("Name").setValue(tf);
        }

    }
}