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.

FixedHeightTable.java 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Table;
  4. import com.vaadin.ui.VerticalLayout;
  5. public class FixedHeightTable extends TestBase {
  6. private static final long serialVersionUID = -929892889178757852L;
  7. Table table;
  8. VerticalLayout layout;
  9. @Override
  10. public void setup() {
  11. table = new Table();
  12. table.addContainerProperty("test", String.class, null);
  13. table.setSizeFull();
  14. // bug: settings rows to 16 or more => last line is not rendered at all
  15. // on the client-side.
  16. final int maxRows = 16;
  17. for (int i = 1; i <= maxRows; i++) {
  18. table.addItem(new Object[] { "" + i }, i);
  19. }
  20. getLayout().setHeight("400px");
  21. addComponent(table);
  22. }
  23. @Override
  24. protected String getDescription() {
  25. return "The table contains 16 (1-16) rows which all should be visible";
  26. }
  27. @Override
  28. protected Integer getTicketNumber() {
  29. return 3814;
  30. }
  31. }