blob: f49fdfd3b998fcef3ddcefed705d8a72168dc39e (
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
|
package com.vaadin.tests.components.table;
import com.vaadin.data.Item;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Table;
public class TableScrollsOnSelection extends TestBase {
@Override
protected void setup() {
getMainWindow().getContent().setSizeUndefined();
IndexedContainer cont = new IndexedContainer();
cont.addContainerProperty("number", String.class, null);
for (int i = 0; i < 80; i++) {
Item item = cont.addItem(i);
item.getItemProperty("number").setValue(i + "");
}
Table table = new Table();
table.setPageLength(0);
table.setContainerDataSource(cont);
table.setSelectable(true);
addComponent(table);
}
@Override
protected String getDescription() {
return "The scroll position should not change when an item is selected in a Table that is higher than the view.";
}
@Override
protected Integer getTicketNumber() {
return 6197;
}
}
|