Skip to content
Snippets Groups Projects
Commit 84cf66af authored by sknobl2s's avatar sknobl2s
Browse files

TransaktionsBestaetigung hinzugefügt (Workaround für den Screencast bei Bedarf)

parent 002ae86a
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ public class InitView extends UI {
navi.addView(Views.SHOPERSTELLUNGSBESTAETIGUNG, ShoperstellungsBestätigung.class);
navi.addView(Views.REGISTRIERUNGSBESTAETIGUNG, RegistrierungsBestaetigung.class);
navi.addView(Views.KONTAKTBESTAETIGUNG, Kontaktbestaetigung.class);
navi.addView(Views.TRANSAKTIONSBESTAETIGUNG, TransaktionsBestaetigung.class);
//Test der RegistrierungsView
UI.getCurrent().getNavigator().navigateTo(Views.WELCOME);
setHeight(100f, Unit.PERCENTAGE);
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.s4s.gui.views;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import org.s4s.services.util.Views;
/**
*
* @author Sebas
*/
public class TransaktionsBestaetigung extends TemplateView implements View {
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
this.setUp();
}
private void setUp() {
Panel panel = new Panel();
panel.setSizeUndefined();
VerticalLayout content = new VerticalLayout();
Button button = new Button("Zurück zur Startseite");
button.addClickListener(e
-> UI.getCurrent().getNavigator().navigateTo(Views.WELCOME));
Label label = new Label("Vielen Dank für ihre Einkauf");
content.addComponent(label);
content.addComponent(button);
content.setMargin(true);
panel.setContent(content);
//this.addComponent(panel);
//this.setComponentAlignment(panel, Alignment.MIDDLE_CENTER);
super.setUpFooterAndHeader(panel);
}
}
......@@ -96,14 +96,15 @@ public class WarenkorbView extends TemplateView {
Button buyButton = new Button("Kaufen!");
buyButton.addClickListener((Button.ClickEvent event) -> {
TransactionControl t = new TransactionControl();
TransactionControl tr = new TransactionControl();
try {
t.createTransactions();
tr.createTransactions();
} catch (DAOException ex) {
Logger.getLogger(WarenkorbView.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(WarenkorbView.class.getName()).log(Level.SEVERE, null, ex);
}
UI.getCurrent().getNavigator().navigateTo(Views.TRANSAKTIONSBESTAETIGUNG);
});
buttonLayout.addComponent(buyButton);
......
......@@ -24,6 +24,7 @@ public final class Views {
public final static String SHOPERSTELLUNGSBESTAETIGUNG = "shoperstellungsbestaetigung";
public final static String REGISTRIERUNGSBESTAETIGUNG = "registrierungsbestaetigung";
public final static String KONTAKTBESTAETIGUNG = "kontaktbestaetigung";
public final static String TRANSAKTIONSBESTAETIGUNG = "transaktionsbestaetigung";
private Views() {
......
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