protected void updateClientCaching() { if (getHeight() < 0) { table.setCacheRate(0); table.setPageLength(0); } else { table.setCacheRate(cacheRate); table.setPageLength(pageLength); } } }
private Layout createPublicInstancesSection() { VerticalLayout layout = new VerticalLayout(); StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.publicInstances.fieldset.label")); fieldsetTitle.addStyleName("fieldset-title"); layout.addComponent(fieldsetTitle); if (activationStorage.getSubscriberResponseTimes().size() > 0) { Table table = new Table(); table.setSelectable(false); table.setMultiSelect(false); table.setImmediate(false); table.setWidth("100%"); table.setPageLength(5); table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.subscriber.label"), String.class, null); table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.max.label"), Long.class, null); table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.min.label"), Long.class, null); table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.avg.label"), Long.class, null); int i = 0; for (Map.Entry<String, ResponseTimeEntry> entry : activationStorage.getSubscriberResponseTimes().entrySet()) { String subscriber = entry.getKey(); long max = entry.getValue().getMax(); long min = entry.getValue().getMin(); long avg = entry.getValue().getAvg(); table.addItem(new Object[]{subscriber, max, min, avg}, i++); } layout.addComponent(table); } else { layout.addComponent(createStaticField(null, i18n.translate("activationMonitor.publicInstances.noActivations.label"))); } return layout; }
table.setImmediate(false); table.setWidth("100%"); table.setPageLength(10);
table.setImmediate(false); table.setWidth("100%"); table.setPageLength(10);