From 15dc2068300d02411a0a328db933141a4ddfa368 Mon Sep 17 00:00:00 2001 From: Mirco Date: Tue, 25 Jun 2024 07:21:27 +0200 Subject: [PATCH] Added @PreserveOnRefresh annotation to prevent Singleton exception --- src/main/java/com/ModeratorElection/MainView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/ModeratorElection/MainView.java b/src/main/java/com/ModeratorElection/MainView.java index f946c33..40bd714 100644 --- a/src/main/java/com/ModeratorElection/MainView.java +++ b/src/main/java/com/ModeratorElection/MainView.java @@ -12,6 +12,7 @@ import com.vaadin.flow.component.notification.Notification; import com.vaadin.flow.component.notification.NotificationVariant; import com.vaadin.flow.component.orderedlayout.HorizontalLayout; import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.PreserveOnRefresh; import com.vaadin.flow.router.Route; import com.vaadin.flow.router.PageTitle; import org.springframework.beans.factory.annotation.Value; @@ -23,6 +24,7 @@ import java.util.List; @Route("") @PageTitle("Moderatorenwahl") +@PreserveOnRefresh @Configuration public class MainView extends VerticalLayout {