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.lang.reflect.Field"%>
11 <%@page import="java.util.Map"%>
12 <%@page import="java.util.Iterator"%>
13 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
14 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
15 <%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
16 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
18 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
19 <jsp:setProperty name="customer" property="*" />
22 // Init application instance
23 PizzaApplication app = PizzaServiceApplication.getInstance(application);
25 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
28 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
29 <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
30 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</title>
36 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
40 <jsp:include page="/static/menu.jsp" flush="true" />
42 <div id="content_outer">
43 <div id="content_title">
44 <h2>Folgendes haben Sie bestellt:</h2>
51 <th class="table_header_column">
54 <th class="table_header_column">
57 <th class="table_header_column">
60 <th class="table_header_column">
63 <th class="table_header_column">
71 Iterator<Product> iterator = app.getAvailableProducts();
73 // "Walk" through all products and unmark them as ordered
74 while (iterator.hasNext()) {
75 // Get product instance
76 Product product = iterator.next();
80 <%=app.getPrintableChoosenFromRequestSession(product, request, session)%>
83 <%=app.handleAmountFromRequestSession(product, request, session)%>
86 <%=product.getTitle()%>
89 <%=product.getPrice()%>
92 <%=app.getTotalPositionPriceFromRequestSession(product, request, session)%>
99 <td id="table_total_amount_left">
102 <td id="table_total_amount_right">
103 <%=app.calculateTotalAmount(request, session)%>
108 <td id="table_total_sum_left">
111 <td id="table_total_sum_right" align="right">
112 <%=app.calculateTotalPrice(request, session)%>
117 <td colspan="5" class="table_header">
123 <td colspan="5" class="table_row">
126 app.getLogger().debug("customer=" + customer);
128 // Get iterator on all fields/attributes
129 Iterator<Map.Entry<Field, Object>> fieldIterator = customer.iterator();
133 while (fieldIterator.hasNext()) {
134 Map.Entry<Field, Object> entry = fieldIterator.next();
136 <li><%=entry.getKey().getName()%> set to: <%=entry.getValue()%></li>
145 <td colspan="5" class="table_footer">
147 if (("POST".equals(request.getMethod())) && (app.calculateTotalAmount(request, session) > 0)) {
148 out.print("Ihre Bestellung ist eingegangen.");
149 synchronized(session) {
150 //session.invalidate();
151 out.print("<div>Zu Demo-Zwecken wird die Sitzung nicht gekillt. Bitte 'Bestellung' aufrufen, um zu gucken, dass die Daten da sind.</div>");
155 out.print("Keine Bestellung aufgegeben.");
165 <jsp:include page="/static/footer.jsp" flush="true" />