Fix exception "new request handling", tie beans to the lifecycle of Vaadin Flow routing components; PreserveOnRefresh is not necessaary
This commit is contained in:
parent
8ce25820e8
commit
41aa59d17d
1 changed files with 3 additions and 3 deletions
|
@ -12,9 +12,9 @@ import com.vaadin.flow.component.notification.Notification;
|
||||||
import com.vaadin.flow.component.notification.NotificationVariant;
|
import com.vaadin.flow.component.notification.NotificationVariant;
|
||||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.router.PreserveOnRefresh;
|
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import com.vaadin.flow.router.PageTitle;
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.spring.annotation.RouteScope;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Route("/")
|
@Route("")
|
||||||
@PageTitle("Moderatorenwahl")
|
@PageTitle("Moderatorenwahl")
|
||||||
@PreserveOnRefresh
|
@RouteScope
|
||||||
@Configuration
|
@Configuration
|
||||||
public class MainView extends VerticalLayout {
|
public class MainView extends VerticalLayout {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue