You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComponentsDisappearWhenScrolling.java 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.shared.ui.ContentMode;
  4. import com.vaadin.tests.components.AbstractTestUI;
  5. import com.vaadin.ui.Button;
  6. import com.vaadin.ui.Label;
  7. import com.vaadin.v7.ui.Table;
  8. public class ComponentsDisappearWhenScrolling extends AbstractTestUI {
  9. @Override
  10. protected void setup(VaadinRequest request) {
  11. Label label = new Label(getDescription(), ContentMode.HTML);
  12. addComponent(label);
  13. Table table = new Table();
  14. table.setSizeFull();
  15. table.setCacheRate(1.1);
  16. table.addContainerProperty(0, Button.class, null);
  17. for (int i = 0; i < 100; i++) {
  18. table.addItem(new Object[] { new Button() }, i);
  19. }
  20. addComponent(table);
  21. }
  22. @Override
  23. public String getDescription() {
  24. return "Scroll all the way down, then slowly back up. More often than"
  25. + " not this results in 'flattening' of several rows. This is "
  26. + "due to component connectors being unregistered on "
  27. + "components, which are on visible table rows.";
  28. }
  29. @Override
  30. protected Integer getTicketNumber() {
  31. return 7964;
  32. }
  33. }