X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=web%2Findex.jsp;h=ec70c2df286c4f59b72d032ef5fe27b60ee9b76c;hb=ee147b754287ac620ffba70f041427a80ea69ae8;hp=37824419eaa74e2785cb269c4ddd6583697b407c;hpb=eca6e8ac6b0287fa70da58c050741c83f616d122;p=pizzaservice-war.git
diff --git a/web/index.jsp b/web/index.jsp
index 37824419..ec70c2df 100644
--- a/web/index.jsp
+++ b/web/index.jsp
@@ -5,135 +5,128 @@
--%>
<%--<%@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();
%>
+
+
+
-
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;
- }
+
+
+
+
+
- // Unmark as ordered
- app.unmarkProductAsOrdered(product, session);
- %>
-
- <%
- }
- %>
+
+
+
+
+
+
+
+
+
+ Warenkorb
+ |
+
+ ${item.amount}
+ |
+
+ ${product.title}
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
-