Skip to content
Snippets Groups Projects
Commit 53a0786c authored by hkarwa2s's avatar hkarwa2s
Browse files

optisch funktionierender Logout

parent d225601f
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>war</packaging>
<packaging>ear</packaging>
<packaging>ejb</packaging>
</packagings>
<goals>
<goal>jetty:run</goal>
</goals>
</action>
</actions>
......@@ -19,6 +19,11 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.s4s.dao.impl.ShopControl;
import org.s4s.exceptions.OwnsAlreadyShop;
import org.s4s.services.util.Views;
/**
......@@ -80,7 +85,13 @@ public class ShopErstellung extends TemplateView implements View {
// String email = emailTxt.getValue();
String shopName = shopname.getValue();
String beschreibung = area.getValue();
// ShopControl.checkUserShop(shopName, beschreibung);
try {
ShopControl.checkUserShop(shopName, beschreibung);
} catch (OwnsAlreadyShop ex) {
Logger.getLogger(ShopErstellung.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(ShopErstellung.class.getName()).log(Level.SEVERE, null, ex);
}
UI.getCurrent().getNavigator().navigateTo(Views.SHOPERSTELLUNGSBESTAETIGUNG);
// select.addValueChangeListener(event ->);
......
......@@ -103,6 +103,7 @@ public class TemplateView extends VerticalLayout implements View {
UI.getCurrent().getNavigator().navigateTo(Views.BENUTZERKONTO);
break;
case "Logout":
session.setAttribute(Roles.CURRENTUSER, null);
UI.getCurrent().getNavigator().navigateTo(Views.WELCOME);
break;
case "Kontakt":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment