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.pizzaapplication.application.PizzaServiceApplication"%>
11 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
12 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
13 <%@page contentType="text/html" pageEncoding="UTF-8"%>
14 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
17 // Init application instance
18 PizzaApplication app = PizzaServiceApplication.getInstance(application);
20 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
21 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
23 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
24 <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
25 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Willkommen</title>
31 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Willkommen</h1>
35 <jsp:include page="/static/menu.jsp" flush="false" />
37 <div id="content_outer">
38 <div id="content_title">
39 <h2>Folgendes kann bestellt werden:</h2>
45 <th class="table_header_column">
48 <th class="table_header_column">
51 <th class="table_header_column">
54 <th class="table_header_column">
62 Iterator<Product> iterator = app.getAvailableProducts();
64 // "Walk" through all products and unmark them as ordered
65 while (iterator.hasNext()) {
66 // Get product instance
67 Product product = iterator.next();
70 app.unmarkProductAsOrdered(product, session);
72 <form action="<%=request.getContextPath()%>/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post">
76 <td class="table_data_column">
77 <input class="submit" type="submit" name="add" value="Hinzufügen" />
78 <input class="input" type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_ID%>" value="<%=product.getId()%>" />
79 <input class="input" type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_TYPE%>" value="<%=Product.class%>" />
81 <td class="table_data_column">
82 <input class="input" type="text" name="<%=PizzaApplication.HTTP_PARAM_AMOUNT%>" size="3" maxlength="20" />
84 <td class="table_data_column">
85 <%=product.getTitle()%>
87 <td class="table_data_column" align="right">
88 <fmt:formatNumber type="currency"><%=product.getPrice()%></fmt:formatNumber>
100 <jsp:include page="/static/footer.jsp" flush="false" />