Added @PreserveOnRefresh annotation to prevent Singleton exception

This commit is contained in:
Mirco 2024-06-25 07:21:27 +02:00
parent 4d508660eb
commit 15dc206830

View file

@ -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 {