com.vaadin.v7.ui.Table.setPageLength()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(618)

本文整理了Java中com.vaadin.v7.ui.Table.setPageLength()方法的一些代码示例,展示了Table.setPageLength()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setPageLength()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setPageLength

Table.setPageLength介绍

[英]Sets the page length.

Setting page length 0 disables paging. The page length defaults to 15.

If Table has height set ( #setHeight(float,Unit) ) the client side may update the page length automatically the correct value.
[中]设置页面长度。
将页面长度设置为0将禁用分页。页面长度默认为15。
如果表格设置了高度(#setHeight(float,Unit)),客户端可以自动将页面长度更新为正确的值。

代码示例

代码示例来源:origin: com.haulmont.cuba/cuba-web

  1. protected void updateClientCaching() {
  2. if (getHeight() < 0) {
  3. table.setCacheRate(0);
  4. table.setPageLength(0);
  5. } else {
  6. table.setCacheRate(cacheRate);
  7. table.setPageLength(pageLength);
  8. }
  9. }
  10. }

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. private Layout createPublicInstancesSection() {
  2. VerticalLayout layout = new VerticalLayout();
  3. StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.publicInstances.fieldset.label"));
  4. fieldsetTitle.addStyleName("fieldset-title");
  5. layout.addComponent(fieldsetTitle);
  6. if (activationStorage.getSubscriberResponseTimes().size() > 0) {
  7. Table table = new Table();
  8. table.setSelectable(false);
  9. table.setMultiSelect(false);
  10. table.setImmediate(false);
  11. table.setWidth("100%");
  12. table.setPageLength(5);
  13. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.subscriber.label"), String.class, null);
  14. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.max.label"), Long.class, null);
  15. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.min.label"), Long.class, null);
  16. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.avg.label"), Long.class, null);
  17. int i = 0;
  18. for (Map.Entry<String, ResponseTimeEntry> entry : activationStorage.getSubscriberResponseTimes().entrySet()) {
  19. String subscriber = entry.getKey();
  20. long max = entry.getValue().getMax();
  21. long min = entry.getValue().getMin();
  22. long avg = entry.getValue().getAvg();
  23. table.addItem(new Object[]{subscriber, max, min, avg}, i++);
  24. }
  25. layout.addComponent(table);
  26. } else {
  27. layout.addComponent(createStaticField(null, i18n.translate("activationMonitor.publicInstances.noActivations.label")));
  28. }
  29. return layout;
  30. }

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. table.setImmediate(false);
  2. table.setWidth("100%");
  3. table.setPageLength(10);

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. table.setImmediate(false);
  2. table.setWidth("100%");
  3. table.setPageLength(10);

相关文章

Table类方法