Let's examine what happens if we modify the UI from a separate thread without using Server Push:
@Title("Report Viewer")public class VaadinUI extends UI { private HorizontalLayout header = new HorizontalLayout(); private MenuBar.MenuItem annualLegalReportItem; ... private void generateAnnualLegalReport() { Notification.show("Report generation started", "You'll be notified once the report is ready.", Notification.Type.TRAY_NOTIFICATION); annualLegalReportItem.setEnabled(false); new Thread(() -> { ByteArrayOutputStream outputStream = AnnualLegalReport.getOutputStream(); ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); Button button = new Button("Download Annual Legal Report", VaadinIcons. ...