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.

DisabledTableShouldNotSendPageLengthUpdates.java 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Button;
  4. import com.vaadin.ui.HorizontalSplitPanel;
  5. import com.vaadin.v7.ui.Table;
  6. @SuppressWarnings("serial")
  7. public class DisabledTableShouldNotSendPageLengthUpdates extends TestBase {
  8. final Table table = new Table();
  9. @Override
  10. protected void setup() {
  11. HorizontalSplitPanel split = new HorizontalSplitPanel();
  12. table.addContainerProperty("name", Integer.class, 0);
  13. Button button = new Button("Add items", event -> {
  14. for (int i = 0; i < 5; i++) {
  15. Object id = table.addItem();
  16. table.getItem(id).getItemProperty("name").setValue(i);
  17. }
  18. });
  19. table.setEnabled(false);
  20. table.setSizeFull();
  21. split.setFirstComponent(table);
  22. split.setSecondComponent(button);
  23. getLayout().setSizeFull();
  24. split.setSizeFull();
  25. addComponent(split);
  26. }
  27. @Override
  28. protected String getDescription() {
  29. return "A disabled table should not send pageLength updates causing 'Warning: Ignoring variable change for disabled component class com.vaadin.ui.Table' warnings in the server logs";
  30. }
  31. @Override
  32. protected Integer getTicketNumber() {
  33. return 4317;
  34. }
  35. }