From: Roland Haeder Date: Thu, 10 Sep 2015 20:15:37 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ee18a5de8f5b186faaf5d3fcfb107c973626597c;p=pizzaservice-war.git Continued: - fixed handling of categories and products in admin area (a lot stuff needed to be fixed) - added stub page basket.xhtml + bye.xhtml - added add_item.xhtml for later confirmation of added item - added navigation rules - updated translation keys - updated jars - added copyright notice :-) (and CSS improved) - many more I forgot ... Signed-off-by:Roland Häder --- diff --git a/install/install.sql b/install/install.sql deleted file mode 100644 index d4bce3b6..00000000 --- a/install/install.sql +++ /dev/null @@ -1,52 +0,0 @@ -DROP TABLE IF EXISTS `category`; -CREATE TABLE IF NOT EXISTS `category` ( -`id` bigint(20) unsigned NOT NULL COMMENT 'Primary key', - `title` varchar(255) NOT NULL COMMENT 'Category title', - `parent` bigint(20) unsigned DEFAULT NULL COMMENT 'Parent category', - PRIMARY KEY (`id`), - INDEX `parent` (`parent`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Categories' ; - -DROP TABLE IF EXISTS `contacts`; -CREATE TABLE IF NOT EXISTS `contacts` ( -`id` bigint(20) unsigned NOT NULL COMMENT 'Primary key', - `own_contact` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether own contact', - `gender` varchar(10) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Gender', - `first_name` varchar(100) NOT NULL COMMENT 'First name', - `family_name` varchar(100) NOT NULL COMMENT 'Family name', - `company_name` varchar(255) DEFAULT NULL COMMENT 'Company name', - `street` varchar(255) DEFAULT NULL COMMENT 'Street name', - `house_number` smallint(5) unsigned DEFAULT NULL COMMENT 'House number', - `city` varchar(100) DEFAULT NULL COMMENT 'City name', - `zip_code` smallint(5) unsigned DEFAULT NULL COMMENT 'ZIP code', - `country_code` char(2) DEFAULT NULL COMMENT 'Country code', - `phone_number` varchar(100) DEFAULT NULL COMMENT 'Phone number', - `cellphone_number` varchar(100) DEFAULT NULL COMMENT 'Cellphone number', - `fax_number` varchar(100) DEFAULT NULL COMMENT 'Fax number', - `email_address` varchar(100) DEFAULT NULL COMMENT 'Email addres', - `birthday` date DEFAULT NULL COMMENT 'Birth day', - `comment` tinytext NOT NULL COMMENT 'Comment', - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Entry created', - `updated` timestamp NULL DEFAULT NULL COMMENT 'Entry updated', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Contacts data' ; - -DROP TABLE IF EXISTS `products`; -CREATE TABLE IF NOT EXISTS `products` ( -`id` bigint(20) unsigned NOT NULL COMMENT 'Primary key', - `category` bigint(20) unsigned DEFAULT NULL COMMENT 'Category id', - `title` varchar(255) NOT NULL COMMENT 'Title of product', - `price` decimal(20,2) unsigned NOT NULL COMMENT 'Product price', - `available` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether product is available', - PRIMARY KEY (`id`), - INDEX `category` (`category`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Products' ; - -ALTER TABLE `category` -MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key'; - -ALTER TABLE `contacts` -MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key'; - -ALTER TABLE `products` -MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key'; diff --git a/lib/jcore-ee-logger.jar b/lib/jcore-ee-logger.jar index c6521224..6160458d 100644 Binary files a/lib/jcore-ee-logger.jar and b/lib/jcore-ee-logger.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index de27ca68..00e90e13 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 935a2c95..3186bb61 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index 4b07e19e..1b9d6e37 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index f0772448..268d3525 100644 Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 4d740b5e..ef91ec23 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -12,15 +12,20 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -BaseContact.gender.unknown.text=Unbekannt -BaseContact.gender.male.text=Herr -BaseContact.gender.female.text=Frau -BaseContact.gender.company.text=Firma + +# Unknown gender +GENDER_UNKNOWN=Unbekannt +GENDER_MALE=Herr +GENDER_FEMALE=Frau +GENDER_COMPANY=Firma MiniBasketTag.basket_is_empty=Der Warenkorb ist leer. -MiniBasketTag.last_item=Zuletzt hinzugefügt: {0} +MiniBasketTag.last_item=Zuletzt hinzugefuegt: {0} MiniBasketTag.additional_items=Es befinden sich noch {0} weitere Produkte im Warenkorb. MiniBasketTag.to_basket=Zum Warenkorb MiniBasketTag.header=Warenkorb -Category.has_no_parent_category=Keine Elternkategorie -Generic_YES=Ja -Generic_NO=Nein +CATEGORY_HAS_NO_PARENT=Keine Elternkategorie +YES=Ja +NO=Nein +PARENT_CATEGORY_CANNOT_BE_NULL=Elternkategorie darf nicht leer sein. +CATEGORY_MUST_BE_SELECTED=Es muss eine Kategorie ausgewaehlt werden. +ITEM_AMOUNT_IS_REQUIRED=Bestellmenge wird benoetigt. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 99889ee9..9554539c 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -1,26 +1,29 @@ # Copyright (C) 2015 Roland Haeder -# + # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# + # You should have received a copy of the GNU General Public License # along with this program. If not, see . -BaseContact.gender.unknown.text=Unknown -BaseContact.gender.male.text=Mr. -BaseContact.gender.female.text=Mrs. -BaseContact.gender.company.text=Company +GENDER_UNKNOWN=Unknown +GENDER_MALE=Mr. +GENDER_FEMALE=Mrs. +GENDER_COMPANY=Company MiniBasketTag.basket_is_empty=The basket is empty. MiniBasketTag.last_item=Last added item: {0} MiniBasketTag.additional_items=There are {0} items in the basket. MiniBasketTag.to_basket=To basket MiniBasketTag.header=Basket -Category.has_no_parent_category=No parent category -Generic_YES=Yes -Generic_NO=No +CATEGORY_HAS_NO_PARENT=No parent category +YES=Yes +NO=No +PARENT_CATEGORY_CANNOT_BE_NULL=Parent category cannot be empty. +CATEGORY_MUST_BE_SELECTED=You have to select a category. +ITEM_AMOUNT_IS_REQUIRED=Order amount is required. diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java index f2b30cb7..58697239 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java @@ -16,7 +16,6 @@ */ package org.mxchange.pizzaapplication.beans.basket; -import java.rmi.RemoteException; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; import javax.faces.FacesException; @@ -24,10 +23,9 @@ import javax.inject.Named; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.beans.BaseFrameworkBean; +import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException; import org.mxchange.jshopcore.model.basket.AddableBasketItem; -import org.mxchange.jshopcore.model.basket.Basket; import org.mxchange.jshopcore.model.basket.BasketSessionBeanRemote; -import org.mxchange.jshopcore.model.basket.ShopBasket; import org.mxchange.jshopcore.model.item.BasketItem; import org.mxchange.jshopcore.model.product.Product; @@ -51,9 +49,14 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl private final BasketSessionBeanRemote basketBean; /** - * Item basket ("cache") + * Ordered amount */ - private final Basket basket; + private Long amount; + + /** + * Current item + */ + private AddableBasketItem currentItem; /** * Default constructor @@ -66,9 +69,16 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Try to lookup this.basketBean = (BasketSessionBeanRemote) context.lookup("ejb/stateless-basket"); //NOI18N + } - // Init basket "cache" - this.basket = new ShopBasket(); + @Override + public Long getAmount () { + return this.amount; + } + + @Override + public void setAmount (final Long amount) { + this.amount = amount; } @Override @@ -76,16 +86,16 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Must not be null if (null == product) { // Abort here - throw new NullPointerException("product is null"); + throw new NullPointerException("product is null"); //NOI18N } // Has the "cache" some entries? - if (!this.basket.isEmpty()) { + if (!this.getBasketBean().isEmpty()) { // Generate fake instance AddableBasketItem item = new BasketItem(product); // Then ask it about it - if (this.basket.isAdded(item)) { + if (this.getBasketBean().isAdded(item)) { // Found it return true; } @@ -95,18 +105,13 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl AddableBasketItem item = new BasketItem(product); // Ask bean about it - return this.basketBean.isAdded(item); + return this.getBasketBean().isAdded(item); } @Override public boolean isEmpty () { - try { - // Call remote bean - return this.getBasketBean().isEmpty(); - } catch (final RemoteException ex) { - // Continued to throw - throw new FacesException(ex); - } + // Check local "cache" + return this.getBasketBean().isEmpty(); } @Override @@ -129,4 +134,46 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl private BasketSessionBeanRemote getBasketBean () { return this.basketBean; } + + @Override + public String addItem (final Product product) { + // Generate item instance + AddableBasketItem item = new BasketItem(product); + + // Is amount set? + if (this.getAmount() == null) { + // No amount specified?! + return null; + } + + // Set amount + item.setAmount(this.getAmount()); + + try { + // Handle it to bean + this.getBasketBean().addItem(item); + + // Add item to local basket, too + //this.basket.addItem(item); + + // Remove amount + this.setAmount(null); + + // Added + return "item_added"; //NOI18N + } catch (final BasketItemAlreadyAddedException ex) { + // Throw unchecked exception + throw new FacesException(ex); + } + } + + @Override + public AddableBasketItem getCurrentItem () { + return this.currentItem; + } + + @Override + public void setCurrentItem (final AddableBasketItem currentItem) { + this.currentItem = currentItem; + } } diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java index f014025f..72bf7db8 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java @@ -17,6 +17,7 @@ package org.mxchange.pizzaapplication.beans.basket; import java.io.Serializable; +import org.mxchange.jshopcore.model.basket.AddableBasketItem; import org.mxchange.jshopcore.model.product.Product; /** @@ -46,4 +47,40 @@ public interface BasketWebController extends Serializable { * @return Whether the product is added */ public boolean isProductAdded (final Product product); + + /** + * Adds given product instance to basket by adding amount from form data to it. + * + * @param product Product instance to add + * @return Redirect target or null + */ + public String addItem (final Product product); + + /** + * Getter for item amount property + * + * @return Item amount property + */ + public Long getAmount (); + + /** + * Setter for item amount property + * + * @param amount Item amount property + */ + public void setAmount (final Long amount); + + /** + * Getter for current item + * + * @return Current item + */ + public AddableBasketItem getCurrentItem (); + + /** + * Setter for current item + * + * @param currentItem Current item + */ + public void setCurrentItem (final AddableBasketItem currentItem); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java index 81e7d0fa..2be39da7 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java @@ -16,7 +16,7 @@ */ package org.mxchange.pizzaapplication.beans.category; -import javax.enterprise.context.SessionScoped; +import javax.enterprise.context.RequestScoped; import javax.faces.view.facelets.FaceletException; import javax.inject.Named; import javax.naming.InitialContext; @@ -33,7 +33,7 @@ import org.mxchange.jshopcore.model.category.ProductCategory; * @author Roland Haeder */ @Named("admin_category") -@SessionScoped +@RequestScoped public class AdminCategoryWebBean extends BaseFrameworkBean implements AdminCategoryWebController { /** * Serial id @@ -100,7 +100,7 @@ public class AdminCategoryWebBean extends BaseFrameworkBean implements AdminCate } @Override - public void setTitle (final Long parentId) { + public void setParentId (final Long parentId) { this.parentId = parentId; } } diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java index 10e8b5f4..545550ad 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java @@ -58,5 +58,5 @@ public interface AdminCategoryWebController { * * @param parentId Parent id to set */ - public void setTitle (final Long parentId); + public void setParentId (final Long parentId); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/ShopWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/ShopWebBean.java index d2b33be9..32eb722f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/ShopWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/ShopWebBean.java @@ -40,6 +40,7 @@ import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote; @Named("controller") @SessionScoped public class ShopWebBean extends BaseFrameworkBean implements ShopWebController { + /** * Serial id */ @@ -57,7 +58,7 @@ public class ShopWebBean extends BaseFrameworkBean implements ShopWebController /** * Default constructor - * + * * @throws javax.naming.NamingException Something happened here? */ public ShopWebBean () throws NamingException { @@ -86,7 +87,7 @@ public class ShopWebBean extends BaseFrameworkBean implements ShopWebController Deque deque = this.getAllCategories(); // Create fake entry - Category fake = new ProductCategory(0L, this.getMessage("Category.has_no_parent_category"), 0L); //NOI18N + Category fake = new ProductCategory(0L, this.getMessage("CATEGORY_HAS_NO_PARENT"), 0L); //NOI18N // Add it deque.addFirst(fake); @@ -97,9 +98,13 @@ public class ShopWebBean extends BaseFrameworkBean implements ShopWebController @Override public Queue getAvailableProducts () throws FacesException { - return this.getProductBean().getAvailableProducts(); + // Get queue from bean + Queue queue = this.getProductBean().getAvailableProducts(); + + // Return it + return queue; } - + @PostConstruct public void init () { // Call super init for getting resource bundle diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java index c3de01c0..1e098fd3 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java @@ -17,7 +17,7 @@ package org.mxchange.pizzaapplication.beans.product; import java.util.Deque; -import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.context.RequestScoped; import javax.faces.view.facelets.FaceletException; import javax.inject.Named; import javax.naming.InitialContext; @@ -34,7 +34,7 @@ import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote; * @author Roland Haeder */ @Named ("admin_product") -@ApplicationScoped +@RequestScoped public class AdminProductWebBean extends BaseFrameworkBean implements AdminProductWebController { /** @@ -51,7 +51,7 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu /** * Category id */ - private Long categoryId; + private Long id; /** * Property price @@ -89,7 +89,7 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu // Add all product.setAvailable(this.getAvailable()); - product.setCategoryId(this.getCategoryId()); + product.setId(this.getId()); product.setPrice(this.getPrice()); product.setTitle(this.getTitle()); @@ -98,7 +98,7 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu // Set all to null this.setAvailable(Boolean.FALSE); - this.setCategoryId(null); + this.setId(null); this.setPrice(null); this.setTitle(null); } catch (final ProductTitleAlreadyUsedException ex) { @@ -119,13 +119,13 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu } @Override - public Long getCategoryId () { - return categoryId; + public Long getId () { + return id; } @Override - public void setCategoryId (Long categoryId) { - this.categoryId = categoryId; + public void setId (Long id) { + this.id = id; } @Override diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java index 23fc5c65..a2ab4167 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java @@ -89,12 +89,12 @@ public interface AdminProductWebController { * * @return Product's category id */ - public Long getCategoryId (); + public Long getId (); /** * Setter for product's category id * - * @param categoryId Product's category id + * @param id Product's category id */ - public void setCategoryId (final Long categoryId); + public void setId (final Long id); } diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 24e7d72b..4a8b5573 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -57,5 +57,16 @@ admin_index /admin/index.xhtml + + basket + /basket.xhtml + + + /index.xhtml + + item_added + /item_added.xhtml + + diff --git a/web/WEB-INF/templates/admin/admin_category_selection_box.tpl b/web/WEB-INF/templates/admin/admin_category_selection_box.tpl index 2ae89974..040e4e7f 100644 --- a/web/WEB-INF/templates/admin/admin_category_selection_box.tpl +++ b/web/WEB-INF/templates/admin/admin_category_selection_box.tpl @@ -4,7 +4,8 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> - - + + + diff --git a/web/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl b/web/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl index c3251221..7faf2c46 100644 --- a/web/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl +++ b/web/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl @@ -4,7 +4,7 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> - - + + diff --git a/web/WEB-INF/templates/guest/guest_footer.tpl b/web/WEB-INF/templates/guest/guest_footer.tpl index 64627481..b2853eac 100644 --- a/web/WEB-INF/templates/guest/guest_footer.tpl +++ b/web/WEB-INF/templates/guest/guest_footer.tpl @@ -5,10 +5,11 @@ xmlns:ui="http://java.sun.com/jsf/facelets"> diff --git a/web/admin/category.xhtml b/web/admin/category.xhtml index 53d89251..b965c810 100644 --- a/web/admin/category.xhtml +++ b/web/admin/category.xhtml @@ -22,7 +22,7 @@ Auswählen: - #{cat.categoryId}: + #{cat.id}: @@ -62,7 +62,7 @@
- +
diff --git a/web/admin/product.xhtml b/web/admin/product.xhtml index 2d8f6df0..9e482ad3 100644 --- a/web/admin/product.xhtml +++ b/web/admin/product.xhtml @@ -13,33 +13,36 @@ - Diese Produkte wurden eingestellt + Diese Produkte sind erstellt worden:
- + Produktnummer: - #{pro.id}: + #{product.id}: Produktbezeichnung: - #{pro.title} + #{product.title} + Einzelpreis: - #{pro.price} + #{product.price} + Kategorie: - #{pro.categoryId} + #{product.categoryId} + Verfügbar: - #{pro.available} + #{product.available} @@ -106,8 +109,8 @@
- - + +
diff --git a/web/basket.xhtml b/web/basket.xhtml new file mode 100644 index 00000000..184cf2d1 --- /dev/null +++ b/web/basket.xhtml @@ -0,0 +1,27 @@ + + + + + Warenkorb + + + + + + + Warenkorb + + + + Hier wird der Warenkorb angezeigt. + + + + + + + diff --git a/web/bye.xhtml b/web/bye.xhtml index c8ba5d94..b293326b 100644 --- a/web/bye.xhtml +++ b/web/bye.xhtml @@ -1,49 +1,27 @@ -<%-- - Document : bye - Created on : 05.08.2015, 10:51:14 - Author : Roland Haeder ---%> + + -<%--<%@page errorPage="errorHandler.jsp" %>--%> + + Sitzung beenden - - - - - - Pizza-Service - Sitzung beenden - + + + - - + + Sitzung beenden + - + + Offenes TODO! + -
-
-

Situng beenden:

-
- -
- <% - synchronized (session) { - if (!session.isNew()) { - // Not new session - session.invalidate(); - out.println("Sitzung beendet."); - } else { - // New session - out.println("Sitzung bereits beendet."); - } - } - %> -
-
- - - + + + +
diff --git a/web/index.xhtml b/web/index.xhtml index 05ae23e3..3e50f8c6 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -61,52 +61,56 @@ + - - - - - - - - - - - #{basket.currentItem.amount} - - - - #{product.title} - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
+ + + #{basket.currentItem.amount} + + #{product.title} + + + + + + + + +
+
+ + + + + @@ -116,7 +120,7 @@ @@ -124,11 +128,11 @@ - - - - - -
- - - + - + - + - +
+ + +
+
+
diff --git a/web/item_added.xhtml b/web/item_added.xhtml new file mode 100644 index 00000000..a80b6826 --- /dev/null +++ b/web/item_added.xhtml @@ -0,0 +1,27 @@ + + + + + Produkt zum Warenkorb hinzugefuegt + + + + + + + Produkt zum Warenkorb hinzugefuegt + + + + Das Produkt wurde zum Warenkorb hinzugefuegt. + + + + + + + diff --git a/web/resources/css/cssLayout.css b/web/resources/css/cssLayout.css index 27d10449..608c9402 100644 --- a/web/resources/css/cssLayout.css +++ b/web/resources/css/cssLayout.css @@ -1,3 +1,9 @@ +/** +div { + border: 1px solid #ff0000; +} +/**/ + #top { position: relative; background-color: #036fab; @@ -57,12 +63,6 @@ text-decoration : underline; } -/** -div { - border: 1px solid #ff0000; -} -/**/ - table, .table { margin: 0px; padding: 0px; @@ -115,16 +115,22 @@ table, .table { ul.footer_nav { text-align: center; - width : 500px; + width : 100%; list-style: none; margin: 0px; } -ul.footer_nav li { +ul.footer_nav li.footer_link { float: left; width: 100px; } +ul.footer_nav li.footer_copyright { + float: right; + width: 300px; + margin-right: 10px; +} + .menu ul { list-style: none; padding-left: 5px;