3 Created on : 04.08.2015, 10:55:47
7 <%--<%@page errorPage="errorHandler.jsp" %>--%>
8 <%@page contentType="text/html" pageEncoding="UTF-8"%>
10 <%@page import="java.util.Map"%>
11 <%@page import="java.util.Iterator"%>
12 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
13 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
14 <%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
15 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
17 <jsp:useBean id="customer" scope="request" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
18 <jsp:setProperty name="customer" property="*" />
21 // Init application instance
22 PizzaApplication app = PizzaServiceApplication.getInstance(application);
24 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
27 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
28 <link rel="stylesheet" href="style.css" type="text/css"/>
29 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</title>
34 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
38 <jsp:include page="static/menu.jsp" flush="true" />
41 <div id="content_outer">
42 <div id="content_title">
43 <h2>Folgendes haben Sie bestellt:</h2>
48 <thead class="table_header">
50 <th class="table_header_column">
53 <th class="table_header_column">
56 <th class="table_header_column">
59 <th class="table_header_column">
62 <th class="table_header_column">
67 <tbody class="table_body">
69 // Get iterator from products
70 Iterator<Map.Entry<String, Product>> iterator = app.getProductsIterator();
73 while (iterator.hasNext()) {
75 Map.Entry<String, Product> entry = iterator.next();
78 Product product = entry.getValue();
80 // Mark product as ordered
81 app.markProductAsOrdered(product, session);
85 <%=app.getPrintableChoosenFromRequestSession(product, request, session)%>
88 <%=app.handleAmountFromRequestSession(product, request, session)%>
91 <%=product.getTitle()%>
94 <%=product.getPrice()%>
97 <%=app.getTotalPositionPriceFromRequestSession(product, request, session)%>
102 float totalPrice = app.calculateTotalPrice(request, session);
105 <td id="table_total_amount_left">
108 <td id="table_total_amount_right">
109 <%=app.calculateTotalAmount(request, session)%>
114 <td id="table_total_sum_left">
117 <td id="table_total_sum_right">
123 <td colspan="5" class="table_header">
129 <td colspan="5" class="table_header">
131 Iterator<Object> fieldIterator = customer.iterator();
135 while (fieldIterator.hasNext()) {
137 <li><%=fieldIterator.next()%></li>
146 <td colspan="5" class="table_footer">
148 if (("POST".equals(request.getMethod())) && (app.calculateTotalAmount(request, session) > 0)) {
149 out.print("Ihre Bestellung ist eingegangen.");
150 synchronized(session) {
151 //session.invalidate();
155 out.print("Keine Bestellung aufgegeben.");