]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Added inital form handler for admin action "do_products"
authorRoland Haeder <roland@mxchange.org>
Wed, 12 Aug 2015 15:37:17 +0000 (17:37 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 12 Aug 2015 15:37:17 +0000 (17:37 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

web/form_handler/admin/do_products.jsp [new file with mode: 0644]
web/form_handler/do_order.jsp

diff --git a/web/form_handler/admin/do_products.jsp b/web/form_handler/admin/do_products.jsp
new file mode 100644 (file)
index 0000000..06c4422
--- /dev/null
@@ -0,0 +1,67 @@
+<%-- 
+       Document   : order
+       Created on : 07.08.2015, 14:58:21
+       Author     : Roland Haeder
+--%>
+
+<%--<%@page errorPage="errorHandler.jsp" %>--%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
+<%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
+<%@page import="org.mxchange.pizzaapplication.product.Product"%>
+
+<%
+       // Init application instance
+       PizzaApplication app = PizzaServiceApplication.getInstance(application);
+
+       // Is it post?
+       if ("POST".equals(request.getMethod())) { //NOI18N
+               // Handle saving customer data and such things
+               
+               // "Walk" over all products
+               for (final Product product : app.getProducts()) {
+                       // Is it choosen?
+                       if (app.isProductChoosen(product, request, session)) {
+                               // Mark product as ordered
+                               app.markProductAsOrdered(product, session);
+                       }
+               }
+
+               // Redirect to proper URL
+               // @TODO Commented out for developing:
+               //response.sendRedirect(request.getContextPath() + "/finished.jsp");
+%>
+<jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
+<jsp:setProperty name="customer" property="*" />
+<jsp:forward page="../finished.jsp" />
+<%
+       }
+%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+               <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
+               <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
+       </head>
+
+       <body>
+               <div id="title">
+                       <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</h1>
+               </div>
+
+               <jsp:include page="/static/menu.jsp" flush="true" />
+
+               <div id="content_outer">
+                       <div id="content_title">
+                               <h2>Bitte nicht direkt aufrufen:</h2>
+                       </div>
+
+                       <div id="content">
+                               Bitte rufen Sie diese Seite nicht direkt auf.
+                       </div>
+               </div>
+       </body>
+</html>
index 06c44225eecc71cf05cd4e3f93ad2b7df2cb48b6..fe2de2f39732372e1d22fd81b27399440ca6b34c 100644 (file)
        // Is it post?
        if ("POST".equals(request.getMethod())) { //NOI18N
                // Handle saving customer data and such things
-               
-               // "Walk" over all products
-               for (final Product product : app.getProducts()) {
-                       // Is it choosen?
-                       if (app.isProductChoosen(product, request, session)) {
-                               // Mark product as ordered
-                               app.markProductAsOrdered(product, session);
-                       }
-               }
 
                // Redirect to proper URL
                // @TODO Commented out for developing:
                //response.sendRedirect(request.getContextPath() + "/finished.jsp");
-%>
-<jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
-<jsp:setProperty name="customer" property="*" />
-<jsp:forward page="../finished.jsp" />
-<%
        }
 %>
 
        <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
-               <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
+               <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler - Administration</title>
        </head>
 
        <body>
                <div id="title">
-                       <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</h1>
+                       <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler - Administration</h1>
                </div>
 
-               <jsp:include page="/static/menu.jsp" flush="true" />
+               <jsp:include page="/static/admin/menu.jsp" flush="true" />
 
                <div id="content_outer">
                        <div id="content_title">