From: Roland Haeder Date: Wed, 12 Aug 2015 15:37:17 +0000 (+0200) Subject: Added inital form handler for admin action "do_products" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ab58da13e6476c340b35404d065f586bdc3787c;p=pizzaservice-war.git Added inital form handler for admin action "do_products" Signed-off-by:Roland Häder --- 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

- +