3 Created on : 04.08.2015, 10:33:10
7 <%@page errorPage="errorHandler.jsp" %>
8 <%@page import="java.util.Map"%>
9 <%@page import="java.util.Iterator"%>
10 <%@page import="org.mxchange.pizzaservice.application.PizzaServiceApplication"%>
11 <%@page import="org.mxchange.pizzaservice.application.PizzaApplication"%>
12 <%@page import="org.mxchange.pizzaservice.product.Product"%>
13 <%@page contentType="text/html" pageEncoding="UTF-8"%>
16 // Init service instance
17 PizzaApplication service = PizzaServiceApplication.getInstance(application);
19 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
22 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
23 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Eingangsseite</title>
28 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Eingangsseite</h1>
33 <li><a href="index.jsp" title="Eingangsseite">Home</a></li>
34 <li><a href="order.jsp" title="Bestellseite">Bestellung</a></li>
35 <li><a href="finished.jsp" title="Bestellung abgeschlossen">Vielen Dank</a></li>
36 <li><a href="bye.jsp" title="Sitzung beennden">Sitzung beenden</a></li>
40 <div id="content_outer">
41 <div id="content_title">
42 <h2>Folgendes kann bestellt werden:</h2>
46 <form action="<%=request.getContextPath()%>/order.jsp" accept-charset="utf-8" id="form" method="post">
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">
64 <tbody class="table_body">
66 // Get iterator from products
67 Iterator<Map.Entry<String, Product>> iterator = service.getProductsIterator();
70 while (iterator.hasNext()) {
72 Map.Entry<String, Product> entry = iterator.next();
75 Product product = entry.getValue();
76 service.unmarkProductAsOrdered(product, session);
80 <input type="checkbox" name="<%=String.format(PizzaApplication.HTTP_PARAM_MASK, PizzaApplication.HTTP_PARAM_CHOOSE, product.getName())%>" value="1" <%=service.getCheckedHtmlFromProduct(product, request, session)%> />
83 <input type="text" name="<%=String.format(PizzaApplication.HTTP_PARAM_MASK, PizzaApplication.HTTP_PARAM_AMOUNT, product.getName())%>" value="<%=service.getAmountFromSession(product, session)%>" size="3" maxlength="20" />
86 <%=product.getTitle()%>
89 <%=product.getPrice()%>
96 <td colspan="4" class="table_footer">
97 <input type="reset" value="Formular zurücksetzen" />
98 <input type="submit" name="send" value="Bestellung ansehen" />