3 Created on : 04.08.2015, 10:55:10
7 <%--<%@page errorPage="errorHandler.jsp" %>--%>
8 <%@page import="java.util.Iterator"%>
9 <%@page import="java.util.Map"%>
10 <%@page import="org.mxchange.jcore.contact.Gender"%>
11 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
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 contentType="text/html" pageEncoding="UTF-8"%>
18 // Init application instance
19 PizzaApplication app = PizzaServiceApplication.getInstance(application);
22 if ("POST".equals(request.getMethod())) { //NOI18N
23 // "Walk" through all products and unmark them as ordered
24 for (final Product product : app.getUnmarkedProducts(session)) {
25 // Is it choosen and amount set?
26 if (app.isProductChoosen(product, request, session)) {
27 // Then mark it as choosen
28 app.markProductAsChoosen(product, session);
31 app.unmarkProductAsChoosen(product, session);
32 app.unmarkProductAsOrdered(product, session);
35 // Redirect to proper URL
36 // @TODO Commented out for developing:
37 //response.sendRedirect(request.getContextPath() + "/finished.jsp");
39 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
40 <jsp:setProperty name="customer" property="*" />
41 <jsp:forward page="../preview.jsp" />
45 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
46 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
48 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
49 <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
50 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
55 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</h1>
58 <jsp:include page="/static/menu.jsp" flush="true" />
60 <div id="content_outer">
61 <div id="content_title">
62 <h2>Bitte nicht direkt aufrufen:</h2>
66 Bitte rufen Sie diese Seite nicht direkt auf.