From 67d26bb7274b449a19e1539005fc3fdee8871779 Mon Sep 17 00:00:00 2001 From: Markus Kreth Date: Sat, 12 Jan 2019 01:25:58 +0100 Subject: [PATCH] Bugfix Login cancel --- pom.xml | 2 +- .../clubhelper/vaadinclubhelper/ui/MainView.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 84f385c..37c006c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ de.kreth.vaadin.clubhelper vaadin-clubhelper - 0.0.3-SNAPSHOT + 1.0.1-SNAPSHOT war vaadin-clubhelper diff --git a/src/main/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/ui/MainView.java b/src/main/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/ui/MainView.java index ab2fe22..303a1d9 100644 --- a/src/main/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/ui/MainView.java +++ b/src/main/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/ui/MainView.java @@ -88,9 +88,15 @@ public class MainView extends HorizontalLayout implements View { exec.shutdown(); LOGGER.info("Loaded UI and started fetch of Events"); } else { - LOGGER.info("{} already initialized - opening Person View."); - openPersonViewForEvent(eventBusiness.getCurrent()); - calendar.setToday(eventBusiness.getCurrent().getStart()); + + loggedinPerson = (Person) getSession().getAttribute(Person.SESSION_LOGIN); + if (loggedinPerson != null) { + LOGGER.info("{} already initialized - opening Person View.", getClass().getName()); + openPersonViewForEvent(eventBusiness.getCurrent()); + calendar.setToday(eventBusiness.getCurrent().getStart()); + } else { + LOGGER.info("{} already initialized - but not loggedin.", getClass().getName()); + } } }