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.

TablePageLengthCalculation.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.TabSheet;
  4. import com.vaadin.ui.Window;
  5. import com.vaadin.v7.ui.Table;
  6. public class TablePageLengthCalculation extends TestBase {
  7. @Override
  8. public void setup() {
  9. Window window = new Window();
  10. window.setCaption("usermanagement");
  11. window.center();
  12. window.setWidth(40, Window.UNITS_PERCENTAGE);
  13. window.setHeight(40, Window.UNITS_PERCENTAGE);
  14. window.setModal(true);
  15. getMainWindow().addWindow(window);
  16. TabSheet tab = new TabSheet();
  17. tab.setSizeFull();
  18. tab.addTab(new TableView(), "users", null);
  19. tab.addTab(new TableView(), "groups", null);
  20. window.setContent(tab);
  21. }
  22. public class TableView extends Table {
  23. private static final long serialVersionUID = 1L;
  24. public TableView() {
  25. setSizeFull();
  26. addContainerProperty("name", String.class, "name");
  27. addContainerProperty("right", Boolean.class, "right");
  28. }
  29. }
  30. @Override
  31. protected String getDescription() {
  32. return "Resize the window and change the selected tab. In Opera 10.50 the updated pagelength will be calculated as a float and not an integer, causing an \"Internal Error\"";
  33. }
  34. @Override
  35. protected Integer getTicketNumber() {
  36. return 4374;
  37. }
  38. }