From 771be378fe00083051a351a3c4e5c6ebfb80d08e Mon Sep 17 00:00:00 2001 From: Tamas Mak Date: Thu, 24 Aug 2023 11:37:30 +0200 Subject: [PATCH] demo: Add example to the demo application for using the UI.navigate(route) (#120) --- .../src/main/java/com/vaadin/sso/demo/view/HomeView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sso-kit-demo/src/main/java/com/vaadin/sso/demo/view/HomeView.java b/sso-kit-demo/src/main/java/com/vaadin/sso/demo/view/HomeView.java index 16cd927..58669f3 100644 --- a/sso-kit-demo/src/main/java/com/vaadin/sso/demo/view/HomeView.java +++ b/sso-kit-demo/src/main/java/com/vaadin/sso/demo/view/HomeView.java @@ -1,5 +1,8 @@ package com.vaadin.sso.demo.view; +import com.vaadin.flow.component.UI; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.html.Anchor; import com.vaadin.flow.component.html.H2; import com.vaadin.flow.component.orderedlayout.VerticalLayout; import com.vaadin.flow.router.PageTitle; @@ -19,5 +22,10 @@ public HomeView() { getStyle().set("text-align", "center"); add(new H2("This page does not require authentication")); + + add(new Anchor("/profile", "Navigate to the secured Profile page")); + + add(new Button("Navigate to the secured Profile page", + e -> UI.getCurrent().navigate("profile"))); } }