From 9ab58da13e6476c340b35404d065f586bdc3787c Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 12 Aug 2015 17:37:17 +0200 Subject: [PATCH] =?utf8?q?Added=20inital=20form=20handler=20for=20admin=20?= =?utf8?q?action=20"do=5Fproducts"=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- web/form_handler/admin/do_products.jsp | 67 ++++++++++++++++++++++++++ web/form_handler/do_order.jsp | 20 ++------ 2 files changed, 70 insertions(+), 17 deletions(-) create mode 100644 web/form_handler/admin/do_products.jsp diff --git a/web/form_handler/admin/do_products.jsp b/web/form_handler/admin/do_products.jsp new file mode 100644 index 00000000..06c44225 --- /dev/null +++ b/web/form_handler/admin/do_products.jsp @@ -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"); +%> + + + +<% + } +%> + + + + + + + <%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler + + + +
+

<%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler

+
+ + + +
+
+

Bitte nicht direkt aufrufen:

+
+ +
+ Bitte rufen Sie diese Seite nicht direkt auf. +
+
+ + diff --git a/web/form_handler/do_order.jsp b/web/form_handler/do_order.jsp index 06c44225..fe2de2f3 100644 --- a/web/form_handler/do_order.jsp +++ b/web/form_handler/do_order.jsp @@ -18,24 +18,10 @@ // 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"); -%> - - - -<% } %> @@ -44,15 +30,15 @@ - <%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler + <%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler - Administration
-

<%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler

+

<%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler - Administration

- +
-- 2.39.5