aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/table/TablePageLengthCalculation.java
blob: 55089ff56b8ce42d623f7323014782b310294858 (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
47
48
49
50
package com.vaadin.tests.components.table;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
import com.vaadin.ui.Window;

public class TablePageLengthCalculation extends TestBase {

    @Override
    public void setup() {

        Window window = new Window();
        window.setCaption("usermanagement");
        window.center();
        window.setWidth(40, Window.UNITS_PERCENTAGE);
        window.setHeight(40, Window.UNITS_PERCENTAGE);
        window.setModal(true);
        getMainWindow().addWindow(window);

        TabSheet tab = new TabSheet();
        tab.setSizeFull();

        tab.addTab(new TableView(), "users", null);
        tab.addTab(new TableView(), "groups", null);

        window.setContent(tab);
    }

    public class TableView extends Table {
        private static final long serialVersionUID = 1L;

        public TableView() {
            setSizeFull();

            addContainerProperty("name", String.class, "name");
            addContainerProperty("right", Boolean.class, "right");
        }
    }

    @Override
    protected String getDescription() {
        return "Resize the window and change the selected tab. In Opera 10.50 the updated pagelength will be calculated as a float and not an integer, causing an \"Internal Error\"";
    }

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