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="true" />
37 <div id="content_outer">
38 <div id="content_title">
39 <h2>Folgendes kann bestellt werden:</h2>
46 <th class="table_header_column">
49 <th class="table_header_column">
52 <th class="table_header_column">
55 <th class="table_header_column">
64 Iterator<Product> iterator = app.getAvailableProducts();
66 // "Walk" through all products and unmark them as ordered
67 while (iterator.hasNext()) {
68 // Get product instance
69 Product product = iterator.next();
72 app.unmarkProductAsOrdered(product, session);
75 <form action="<%=request.getContextPath()%>/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post">
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%>" />
82 <input class="input" type="text" name="<%=PizzaApplication.HTTP_PARAM_AMOUNT%>" size="3" maxlength="20" />
85 <%=product.getTitle()%>
88 <fmt:formatNumber type="currency"><%=product.getPrice()%></fmt:formatNumber>
100 <jsp:include page="/static/footer.jsp" flush="true" />