X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=web%2Findex.jsp;h=ec70c2df286c4f59b72d032ef5fe27b60ee9b76c;hb=ec76222ee0d4f850fb1b718a1bf1bcf414c2cd38;hp=e6b2b617561b63fa8112475b448e4f05b1212860;hpb=5a4a9e00f942ac32a4553b013f0accabeff4d562;p=pizzaservice-war.git diff --git a/web/index.jsp b/web/index.jsp index e6b2b617..ec70c2df 100644 --- a/web/index.jsp +++ b/web/index.jsp @@ -5,34 +5,35 @@ --%> <%--<%@page errorPage="errorHandler.jsp" %>--%> -<%@page import="java.util.Map"%> -<%@page import="java.util.Iterator"%> -<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> -<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%> -<%@page import="org.mxchange.pizzaapplication.product.Product"%> -<%@page import="org.mxchange.pizzaapplication.basket.Basket"%> -<%@page import="org.mxchange.pizzaapplication.basket.item.ItemBasket"%> -<%@page import="org.mxchange.pizzaapplication.item.basket.BasketItem"%> -<%@page import="org.mxchange.pizzaapplication.item.AddableBasketItem"%> +<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@taglib prefix="basket" uri="http://mxchange.org/jshop/tags/basket" %> + + + + <% - // Init application instance - PizzaApplication app = PizzaServiceApplication.getInstance(application); + // TODO: Can be removed later + controller.init(); %> + + + - - <%=PizzaServiceApplication.MAIN_TITLE%> - Willkommen + + Pizza-Service - Willkommen @@ -40,97 +41,89 @@
-

Folgendes kann bestellt werden:

+

Eingangsseite (dummy):

- - - - - - - -
- Bestellen? - - Anzahl: - - Produkt: - - Einzelpreis: -
- - <% - // Get Iterator - Iterator iterator = app.getAvailableProducts(); - - // "Walk" through all products and unmark them as ordered - while (iterator.hasNext()) { - // Get product instance - Product product = iterator.next(); + + - // Get basket instance - Basket basket = ItemBasket.getInstance(session); - - // Create an item instance form this product - AddableBasketItem item = basket.getItem(product); - - // Has it been already added to the basket? - if (item != null) { - // Some nice output ... - %> - - - - - - - - -
- Warenkorb - - <%=item.getAmount()%> - - <%=product.getTitle()%> - - <%=product.getPrice()%> -
- <% - // Then skip this item - continue; - } + + + + Folgendes kann bestellt werden: + + + - // Unmark as ordered - app.unmarkProductAsOrdered(product, session); - %> -
- - - - - - - + + + + + +
- - - - - - - <%=product.getTitle()%> - - <%=product.getPrice()%> -
+ Bestellen? + + Anzahl: + + Produkt: + + Einzelpreis: +
-
- <% - } - %> + + + + + + + + + + + + + + +
+ Warenkorb + + ${item.amount} + + ${product.title} + + +
+
+ +
+ + + + + + + + + +
+ + + + + + + ${product.title} + + +
+
+
+
+