aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java
blob: 6b1714b14818ac9248e7d25a13700736900f6997 (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
36
37
38
39
40
41
42
43
44
45
46
package com.vaadin.tests.components.table;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.PopupView;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.ui.Table;

public class PopupViewInTable extends AbstractReindeerTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        Table t = new Table();
        t.addContainerProperty("text", String.class, "");
        t.addContainerProperty("pv", Component.class, null);
        t.addItem(new Object[] { "Foo", createPopupView() }, "foo");
        addComponent(t);
    }

    private PopupView createPopupView() {
        PopupView pv = new PopupView("Click me", createContent());
        return pv;
    }

    private Component createContent() {
        VerticalLayout vl = new VerticalLayout(new Label("Hello"),
                new Button("World"));
        return vl;
    }

    @Override
    protected String getTestDescription() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    protected Integer getTicketNumber() {
        // TODO Auto-generated method stub
        return null;
    }

}