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.

TableLastRowMissing.java 897B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.data.Item;
  3. import com.vaadin.tests.components.TestBase;
  4. import com.vaadin.ui.Table;
  5. import com.vaadin.ui.TextField;
  6. public class TableLastRowMissing extends TestBase {
  7. @Override
  8. protected String getDescription() {
  9. return "The table below should display 3 rows. Each with a textfield containing the row number.";
  10. }
  11. @Override
  12. protected Integer getTicketNumber() {
  13. return 2933;
  14. }
  15. @Override
  16. protected void setup() {
  17. Table t = new Table();
  18. addComponent(t);
  19. t.addContainerProperty("Name", TextField.class, null);
  20. for (int i = 0; i < 3; i++) {
  21. Item item = t.addItem(i);
  22. TextField tf = new TextField("", String.valueOf(i + 1));
  23. tf.setColumns(10);
  24. item.getItemProperty("Name").setValue(tf);
  25. }
  26. }
  27. }