]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 8 Sep 2015 20:48:29 +0000 (22:48 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 8 Sep 2015 20:48:29 +0000 (22:48 +0200)
- first pages are working again!
- migrated from JSP to JSF (more needs to be done)
- added navigation rules
- updated jcore.jar, jcoreee.jar, jshop-core.jar, jshop-ee-lib.jar + jswingcore.jar
Signed-off-by:Roland Häder <roland@mxchange.org>

44 files changed:
lib/jcore.jar
lib/jcoreee.jar
lib/jshop-core.jar
lib/jshop-ee-lib.jar
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebBean.java
src/java/org/mxchange/pizzaapplication/beans/basket/PizzaServiceBasketWebBean.java
src/java/org/mxchange/pizzaapplication/beans/controller/AdminProductWebController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java
src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java
src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/gender/PizzaServiceGenderController.java [new file with mode: 0644]
web/WEB-INF/faces-config.xml
web/WEB-INF/static/admin/admin_category_selection_box.jsp [deleted file]
web/WEB-INF/static/admin/admin_footer.jsp [deleted file]
web/WEB-INF/static/admin/admin_menu.jsp [deleted file]
web/WEB-INF/static/admin/admin_parent_category_selection_box.jsp [deleted file]
web/WEB-INF/templates.dist/admin_page.xhtml [new file with mode: 0644]
web/WEB-INF/templates.dist/guest_page.xhtml
web/WEB-INF/templates/admin/admin_base.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/admin_category_selection_box.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/admin_footer.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/admin_menu.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl [new file with mode: 0644]
web/WEB-INF/templates/base.tpl
web/WEB-INF/templates/guest/guest_base.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/WEB-INF/web.xml
web/admin/category.jsp [deleted file]
web/admin/category.xhtml [new file with mode: 0644]
web/admin/index.jsp [deleted file]
web/admin/index.xhtml [new file with mode: 0644]
web/admin/product.jsp [deleted file]
web/admin/product.xhtml [new file with mode: 0644]
web/customer/login.xhtml
web/index.xhtml
web/resources/css/cssLayout.css
web/terms.xhtml

index 7318d475bd60750789a5af0d8c58471ad7d4f1d8..217c364fc77db0e54d31c837de5517fdce382fb0 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index f479cd85f681296c81d035819d67d492850194ec..9f0039fef5c5783f9feefb340c1781b104232d23 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 9965f385e61d36baf52fba5fce71f241d62a54ea..3772ba4f64521091bb8321d30622e5475449b72d 100644 (file)
Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ
index 54ab89b53838c3734cca1275258252fce03841f1..7b5364022b09a7af86a6f90ceecc825c6c3a74dd 100644 (file)
Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ
index cd59461dc32e3fdce09bdcbe9fc83423c15db14a..4f43a2bd39cbba02eced71a10d1eba52c780f437 100644 (file)
@@ -1030,11 +1030,11 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
     <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
-        <copyfiles files="${reference.PizzaService-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcore.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcoreee.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jshop-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jshop-ee-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${reference.PizzaService-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.cdi-api.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.gf-client.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.log4j-api-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
@@ -1044,11 +1044,11 @@ exists or setup the property manually. For example like this:
         <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
     <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
-        <copyfiles files="${reference.PizzaService-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcoreee.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jshop-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jshop-ee-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${reference.PizzaService-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.cdi-api.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.gf-client.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.log4j-api-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
index 2ae24f4c10e1f6d268a2cac31d9fdd88e19d117a..c0c289dcd056f0b813df9a62ab8d3c97a6bf74c2 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=1edfee4e
+build.xml.data.CRC32=ae8d1d07
 build.xml.script.CRC32=82213886
 build.xml.stylesheet.CRC32=651128d4@1.68.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=1edfee4e
-nbproject/build-impl.xml.script.CRC32=055d9dec
+nbproject/build-impl.xml.data.CRC32=ae8d1d07
+nbproject/build-impl.xml.script.CRC32=6b50b9cf
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1
index a21586fd8ae46509706d2875af43668d54195eef..f0ff76fd5f788d6f67fe27cc7126f6fcfe1cd563 100644 (file)
@@ -50,7 +50,7 @@ j2ee.compile.on.save=true
 j2ee.copy.static.files.on.save=true
 j2ee.deploy.on.save=true
 j2ee.platform=1.7
-j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar
+j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar
@@ -59,11 +59,11 @@ j2ee.platform.wsit.classpath=
 j2ee.server.type=gfv3ee6
 jar.compress=false
 javac.classpath=\
-    ${reference.PizzaService-lib.jar}:\
     ${file.reference.jcore.jar}:\
     ${file.reference.jcoreee.jar}:\
     ${file.reference.jshop-core.jar}:\
     ${file.reference.jshop-ee-lib.jar}:\
+    ${reference.PizzaService-lib.jar}:\
     ${file.reference.cdi-api.jar}:\
     ${file.reference.gf-client.jar}:\
     ${file.reference.log4j-api-2.3.jar}:\
index dee8330a3db86865cef696812d1c25ab0a3134c1..a412ce80e5fb476343d6426b6cdd5141567c23d1 100644 (file)
@@ -6,10 +6,6 @@
             <name>PizzaService-war</name>
             <minimum-ant-version>1.6.5</minimum-ant-version>
             <web-module-libraries>
-                <library dirs="200">
-                    <file>${reference.PizzaService-lib.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
                 <library dirs="200">
                     <file>${file.reference.jcore.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                     <file>${file.reference.jshop-ee-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
+                <library dirs="200">
+                    <file>${reference.PizzaService-lib.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
                 <library dirs="200">
                     <file>${file.reference.cdi-api.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
index 68ffc3bccaa63a10a72fabf340b6143e9e408aa6..12b55bc1088f8114f8bbc84847ad9929d59656e6 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.pizzaapplication.beans.basket;
 
 import java.io.Serializable;
+import org.mxchange.jshopcore.model.product.Product;
 
 /**
  * An interface for a basket
@@ -37,4 +38,11 @@ public interface PizzaBasketWebBean extends Serializable {
         * @return Whether the basket is empty
         */
        public boolean hasItems ();
+
+       /**
+        * Setter for current product instance
+        * 
+        * @param product Product instance
+        */
+       public void setCurrentProduct (final Product product);
 }
index 05586ed717ed07818a4cf4f6ebb0465760b7af46..eca1f9eb4e1e795864f74ffa455c93b107dc3a8c 100644 (file)
@@ -24,7 +24,8 @@ import javax.inject.Named;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.beans.BaseFrameworkBean;
-import org.mxchange.jshopeelib.beans.remote.basket.BasketSessionBeanRemote;
+import org.mxchange.jshopcore.model.basket.BasketSessionBeanRemote;
+import org.mxchange.jshopcore.model.product.Product;
 
 /**
  * A bean for the basket
@@ -45,6 +46,11 @@ public class PizzaServiceBasketWebBean extends BaseFrameworkBean implements Pizz
         */
        private final BasketSessionBeanRemote basket;
 
+       /**
+        * Current product instance
+        */
+       private Product currentProduct;
+
        /**
         * Default constructor
         *
@@ -80,4 +86,9 @@ public class PizzaServiceBasketWebBean extends BaseFrameworkBean implements Pizz
                // Call super init first
                super.genericInit();
        }
+
+       @Override
+       public void setCurrentProduct (final Product product) {
+               this.currentProduct = product;
+       }
 }
diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/AdminProductWebController.java b/src/java/org/mxchange/pizzaapplication/beans/controller/AdminProductWebController.java
new file mode 100644 (file)
index 0000000..6000979
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.controller;
+
+import java.util.Deque;
+import javax.faces.view.facelets.FaceletException;
+import org.mxchange.jshopcore.model.category.Category;
+import org.mxchange.jshopcore.model.product.Product;
+
+/**
+ * An interface for product controllers for "ADMIN" role
+ *
+ * @author Roland Haeder
+ */
+public interface AdminProductWebController {
+
+       /**
+        * Adds given category data from request to database
+        *
+        * @param category Category instance
+        * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
+        */
+       public void doAdminAddCategory (final Category category) throws FaceletException;
+
+       /**
+        * Adds given product data from request to database
+        *
+        * @param product Product instance
+        * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
+        */
+       public void doAdminAddProduct (final Product product) throws FaceletException;
+
+       /**
+        * Some "getter" for a linked list of all products
+        *
+        * @return All products
+        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
+        */
+       public Deque<Product> getAllProducts () throws FaceletException;
+}
index 8755c9f7d049b6493521ab60a5b1420bf1e4085b..cbaf01b30486bc886b594fab70e3223ba873443e 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.pizzaapplication.beans.controller;
 
-import java.io.IOException;
 import java.rmi.RemoteException;
 import java.util.Deque;
 import javax.annotation.PostConstruct;
@@ -26,11 +25,11 @@ import javax.inject.Named;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.beans.BaseFrameworkBean;
-import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException;
-import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException;
 import org.mxchange.jshopcore.model.category.Category;
+import org.mxchange.jshopcore.model.category.CategorySessionBeanRemote;
+import org.mxchange.jshopcore.model.category.ProductCategory;
 import org.mxchange.jshopcore.model.product.Product;
-import org.mxchange.jshopeelib.beans.remote.shop.ShopSessionBeanRemote;
+import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote;
 
 /**
  * Main application class
@@ -46,9 +45,14 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
        private static final long serialVersionUID = 58_137_539_530_279L;
 
        /**
-        * Remote bean
+        * Remote bean for categories
         */
-       private final ShopSessionBeanRemote shop;
+       private final CategorySessionBeanRemote category;
+
+       /**
+        * Remote bean for products
+        */
+       private final ProductSessionBeanRemote product;
 
        /**
         * Default constructor
@@ -60,7 +64,10 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
                InitialContext context = new InitialContext();
 
                // Try to lookup the bean
-               this.shop = (ShopSessionBeanRemote) context.lookup("ejb/stateless-shop"); //NOI18N
+               this.category = (CategorySessionBeanRemote) context.lookup("ejb/stateless-category"); //NOI18N
+
+               // Try to lookup the bean
+               this.product = (ProductSessionBeanRemote) context.lookup("ejb/stateless-product"); //NOI18N
        }
 
        @PostConstruct
@@ -72,17 +79,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
        @Override
        public Deque<Product> getAvailableProducts () throws FacesException {
                try {
-                       return this.getShop().getAvailableProducts();
-               } catch (final RemoteException ex) {
-                       // Continue to throw
-                       throw new FacesException(ex);
-               }
-       }
-
-       @Override
-       public Deque<Product> getAllProducts () throws FacesException {
-               try {
-                       return this.getShop().getAllProducts();
+                       return this.getProduct().getAvailableProducts();
                } catch (final RemoteException ex) {
                        // Continue to throw
                        throw new FacesException(ex);
@@ -92,31 +89,30 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
        @Override
        public Deque<Category> getAllCategories () throws FacesException {
                try {
-                       return this.getShop().getAllCategories();
-               } catch (final RemoteException ex) {
-                       // Continue to throw
-                       throw new FacesException(ex);
-               }
-       }
+                       // Fake zero category
+                       Category c = new ProductCategory(0L, "Ist oberste Kategorie", 0L);
 
-       @Override
-       public void doAdminAddCategory (final Category category) throws FacesException {
-               try {
-                       this.getShop().doAdminAddCategory(category);
-               } catch (final IOException | CategoryTitleAlreadyUsedException ex) {
+                       // Get List back
+                       Deque<Category> deque = this.getCategory().getAllCategories();
+
+                       // Add fake category
+                       deque.addFirst(c);
+
+                       // Return it
+                       return deque;
+               } catch (final RemoteException ex) {
                        // Continue to throw
                        throw new FacesException(ex);
                }
        }
 
-       @Override
-       public void doAdminAddProduct (final Product product) throws FacesException {
-               try {
-                       this.getShop().doAdminAddProduct(product);
-               } catch (final IOException | ProductTitleAlreadyUsedException ex) {
-                       // Continue to throw
-                       throw new FacesException(ex);
-               }
+       /**
+        * Getter for shop remote bean
+        *
+        * @return Remote shop bean
+        */
+       private CategorySessionBeanRemote getCategory () {
+               return this.category;
        }
 
        /**
@@ -124,7 +120,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
         *
         * @return Remote shop bean
         */
-       private ShopSessionBeanRemote getShop () {
-               return this.shop;
+       private ProductSessionBeanRemote getProduct () {
+               return this.product;
        }
 }
index 8c248e50ca72c4d03ba85951619a7a5bb8e6cbff..d58d0449e4ee7d8244cc1a129bd534326981dac4 100644 (file)
@@ -37,14 +37,6 @@ public interface PizzaWebBean extends Serializable {
         */
        public Deque<Product> getAvailableProducts () throws FaceletException;
 
-       /**
-        * Some "getter" for a linked list of all products
-        *
-        * @return All products
-        * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-        */
-       public Deque<Product> getAllProducts () throws FaceletException;
-
        /**
         * Some "getter" for a linked list of all categories
         *
@@ -52,20 +44,4 @@ public interface PizzaWebBean extends Serializable {
         * @throws javax.faces.view.facelets.FaceletException If anything went wrong
         */
        public Deque<Category> getAllCategories () throws FaceletException;
-
-       /**
-        * Adds given category data from request to database
-        *
-        * @param category Category instance
-        * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
-        */
-       public void doAdminAddCategory (final Category category) throws FaceletException;
-
-       /**
-        * Adds given product data from request to database
-        *
-        * @param product Product instance
-        * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
-        */
-       public void doAdminAddProduct (final Product product) throws FaceletException;
 }
index 8b9af4d645e2b817ddca61ef0fa7c2af605c81c6..089590f01056c9abc27de39fcdffe55a4f77b325 100644 (file)
@@ -22,7 +22,7 @@ import javax.inject.Named;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.beans.BaseFrameworkBean;
-import org.mxchange.jshopeelib.beans.remote.customer.CustomerSessionBeanRemote;
+import org.mxchange.jshopcore.model.customer.CustomerSessionBeanRemote;
 
 /**
  * A customer bean which hides the customer instance
diff --git a/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java
deleted file mode 100644 (file)
index c75c80a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.data;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcore.model.contact.gender.Gender;
-
-/**
- * An interface for data beans
- *
- * @author Roland Haeder
- */
-public interface DataWebBean extends Serializable {
-
-       /**
-        * Getter for all genders as array
-        *
-        * @return All genders as array
-        */
-       public Gender[] allGenders ();
-
-       /**
-        * Getter for only selectable genders as array, UNKNOWN is not selectable
-        *
-        * @return All genders as array
-        */
-       public List<Gender> selectableGenders ();
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java
deleted file mode 100644 (file)
index aa97790..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.data;
-
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Named;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jcore.model.contact.gender.Gender;
-import org.mxchange.jcoreee.beans.BaseFrameworkBean;
-import org.mxchange.jshopeelib.beans.remote.data.ShopDataBeanRemote;
-
-/**
- * A customer bean which hides the customer instance
- *
- * @author Roland Haeder
- */
-@Named ("data")
-@ApplicationScoped
-public class PizzaServiceDataWebBean extends BaseFrameworkBean implements DataWebBean {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 835_482_364_189L;
-
-       /**
-        * Remote bean
-        */
-       private final ShopDataBeanRemote data;
-
-       /**
-        * Default constructor
-        * 
-        * @throws javax.naming.NamingException If something happens?
-        */
-       public PizzaServiceDataWebBean () throws NamingException {
-               // Get initial context
-               InitialContext context = new InitialContext();
-
-               // Try to lookup bean
-               this.data = (ShopDataBeanRemote) context.lookup("ejb/stateless-data"); //NOI18N
-       }
-
-       @Override
-       public Gender[] allGenders () {
-               // Return it
-               return this.getData().allGenders();
-       }
-
-       @Override
-       public List<Gender> selectableGenders () {
-               // Init array
-               // TODO Call EJB here?
-               List<Gender> genders = this.getData().selectableGenders();
-
-               // Return it
-               return genders;
-       }
-
-       /**
-        * Getter for data remote bean
-        *
-        * @return data remote bean
-        */
-       private ShopDataBeanRemote getData () {
-               return this.data;
-       }
-
-       @PostConstruct
-       public void init () throws RuntimeException {
-               // Call super method
-               super.genericInit();
-       }
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebBean.java
new file mode 100644 (file)
index 0000000..e6c4408
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.gender;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcore.model.contact.gender.Gender;
+
+/**
+ * An interface for data beans
+ *
+ * @author Roland Haeder
+ */
+public interface GenderWebBean extends Serializable {
+
+       /**
+        * Getter for all genders as array
+        *
+        * @return All genders as array
+        */
+       public Gender[] allGenders ();
+
+       /**
+        * Getter for only selectable genders as array, UNKNOWN is not selectable
+        *
+        * @return All genders as array
+        */
+       public List<Gender> selectableGenders ();
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/gender/PizzaServiceGenderController.java b/src/java/org/mxchange/pizzaapplication/beans/gender/PizzaServiceGenderController.java
new file mode 100644 (file)
index 0000000..fc39c97
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.gender;
+
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Named;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcore.model.contact.gender.Gender;
+import org.mxchange.jcore.model.contact.gender.GenderSessionBeanRemote;
+import org.mxchange.jcoreee.beans.BaseFrameworkBean;
+
+/**
+ * A customer bean which hides the customer instance
+ *
+ * @author Roland Haeder
+ */
+@Named ("data")
+@ApplicationScoped
+public class PizzaServiceGenderController extends BaseFrameworkBean implements GenderWebBean {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 835_482_364_189L;
+
+       /**
+        * Remote bean
+        */
+       private final GenderSessionBeanRemote gender;
+
+       /**
+        * Default constructor
+        * 
+        * @throws javax.naming.NamingException If something happens?
+        */
+       public PizzaServiceGenderController () throws NamingException {
+               // Get initial context
+               InitialContext context = new InitialContext();
+
+               // Try to lookup bean
+               this.gender = (GenderSessionBeanRemote) context.lookup("ejb/stateless-data"); //NOI18N
+       }
+
+       @Override
+       public Gender[] allGenders () {
+               // Return it
+               return this.getGender().allGenders();
+       }
+
+       @Override
+       public List<Gender> selectableGenders () {
+               // Init array
+               // TODO Call EJB here?
+               List<Gender> genders = this.getGender().selectableGenders();
+
+               // Return it
+               return genders;
+       }
+
+       /**
+        * Getter for data remote bean
+        *
+        * @return data remote bean
+        */
+       private GenderSessionBeanRemote getGender () {
+               return this.gender;
+       }
+
+       @PostConstruct
+       public void init () throws RuntimeException {
+               // Call super method
+               super.genericInit();
+       }
+}
index 1010e3f5ee4404ca760102a1d7cf80347d6bf51b..4f60a7699a3ca22f33fedd2792fb52a06d907561 100644 (file)
                <validator-id>NameValidator</validator-id>
                <validator-class>org.mxchange.jcoreee.validator.string.names.NameValidator</validator-class>
        </validator>
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>customer_register</from-outcome>
+            <to-view-id>/customer/register.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>index</from-outcome>
+            <to-view-id>/index.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>customer_lost_passwd</from-outcome>
+            <to-view-id>/customer/lost_passwd.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>customer_login</from-outcome>
+            <to-view-id>/customer/login.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>terms</from-outcome>
+            <to-view-id>/terms.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>privacy</from-outcome>
+            <to-view-id>/privacy.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>imprint</from-outcome>
+            <to-view-id>/imprint.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>logout</from-outcome>
+            <to-view-id>/bye.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>admin_product</from-outcome>
+            <to-view-id>/admin/product.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>admin_category</from-outcome>
+            <to-view-id>/admin/category.xhtml</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>admin_index</from-outcome>
+            <to-view-id>/admin/index.xhtml</to-view-id>
+        </navigation-case>
+    </navigation-rule>
 </faces-config>
diff --git a/web/WEB-INF/static/admin/admin_category_selection_box.jsp b/web/WEB-INF/static/admin/admin_category_selection_box.jsp
deleted file mode 100644 (file)
index e1d2bec..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<%-- 
-       Document   : admin_category_selection_box
-       Created on : 14.08.2015, 12:51:05
-       Author     : Roland Haeder
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<select class="select" name="categoryId" size="1">
-       <c:forEach var="category" items="${controller.allCategoriesIterator}">
-               <option value="${category.categoryId}">${category.decodedTitle}</option>
-       </c:forEach>
-</select>
diff --git a/web/WEB-INF/static/admin/admin_footer.jsp b/web/WEB-INF/static/admin/admin_footer.jsp
deleted file mode 100644 (file)
index aa6b21b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<%-- 
-       Document   : admin_footer
-       Created on : 11.08.2015, 12:28:03
-       Author     : Roland Haeder
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<div class="footer">
-       <ul class="footer_nav">
-               <li><a href="${basePath}/">Zur Webseite</a></li>
-       </ul>
-</div>
-
-<div class="clear"></div>
diff --git a/web/WEB-INF/static/admin/admin_menu.jsp b/web/WEB-INF/static/admin/admin_menu.jsp
deleted file mode 100644 (file)
index 9250428..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<%-- 
-       Document   : admin_menu
-       Created on : 06.08.2015, 12:41:44
-       Author     : Roland Haeder
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<div id="menu">
-       <ul>
-               <li><a href="${basePath}/admin/" title="Eingangsseite">Home</a></li>
-               <li><a href="${basePath}/admin/category.jsp" title="Kazegorie">Kategorie</a></li>
-               <li><a href="${basePath}/admin/product.jsp" title="Produkt">Produkt</a></li>
-       </ul>
-
-       <ul>
-               <li><a href="${basePath}/admin/logout.jsp" title="Ausloggen">Ausloggen</a></li>
-               <li><a href="${basePath}/" title="Zur Webseite, aber eingeloggt bleiben">Webseite aufrufen</a></li>
-       </ul>
-</div>
diff --git a/web/WEB-INF/static/admin/admin_parent_category_selection_box.jsp b/web/WEB-INF/static/admin/admin_parent_category_selection_box.jsp
deleted file mode 100644 (file)
index c00a925..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<%-- 
-       Document   : admin_parent_category_selection_box
-       Created on : 14.08.2015, 12:51:05
-       Author     : Roland Haeder
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<select class="select" name="parentId" size="1">
-       <option value="">Ist oberste Kategorie</option>
-       <c:forEach var="category" items="${controller.allCategoriesIterator}">
-               <option value="${category.categoryId}">${category.decodedTitle}</option>
-       </c:forEach>
-</select>
diff --git a/web/WEB-INF/templates.dist/admin_page.xhtml b/web/WEB-INF/templates.dist/admin_page.xhtml
new file mode 100644 (file)
index 0000000..c83abe2
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">Your page's title here</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="admin_menu" src="/WEB-INF/templates/admin/admin_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       Your header above content here
+               </ui:define>
+
+               <ui:define name="content">
+                       Here goes your content.
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
index 7439d6380fd583b639a5f0b7ff1bcff2d300546a..0622bd442bc454cacbebbf91b608b249496fd601 100644 (file)
@@ -6,7 +6,7 @@
          >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
-               <ui:define name="title">Your page's title here</ui:define>
+               <ui:define name="guest_title">Your page's title here</ui:define>
 
                <ui:define name="menu">
                        <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
diff --git a/web/WEB-INF/templates/admin/admin_base.tpl b/web/WEB-INF/templates/admin/admin_base.tpl
new file mode 100644 (file)
index 0000000..0305ff9
--- /dev/null
@@ -0,0 +1,11 @@
+<ui:composition
+       template="/WEB-INF/templates/base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <ui:define name="title">Administration - <ui:insert name="admin_title" class="admin_title" /></ui:define>
+
+       <!--
+       TODO: Add something here that should be displayed on all admin pages
+       //-->
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/admin_category_selection_box.tpl b/web/WEB-INF/templates/admin/admin_category_selection_box.tpl
new file mode 100644 (file)
index 0000000..8783f81
--- /dev/null
@@ -0,0 +1,10 @@
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <h:selectOneMenu class="select" id="category_id">
+               <f:selectItems value="#{controller.allCategories}" var="categoryId" itemValue="#{categoryId.categoryId}" itemLabel="#{categoryId.title}" />
+       </h:selectOneMenu>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/admin_footer.tpl b/web/WEB-INF/templates/admin/admin_footer.tpl
new file mode 100644 (file)
index 0000000..ecdae42
--- /dev/null
@@ -0,0 +1,13 @@
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+       <div class="footer">
+               <ul class="footer_nav">
+                       <li><h:link outcome="index" value="Zur Webseite" /></li>
+               </ul>
+       </div>
+
+       <div class="clear"></div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl
new file mode 100644 (file)
index 0000000..9e98415
--- /dev/null
@@ -0,0 +1,19 @@
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <div id="menu">
+               <ul>
+                       <li><h:link title="Zur Willkommensseite" outcome="admin_index" value="Home" /></li>
+                       <li><h:link title="Kategorie" outcome="admin_category" value="Kategorie" /></li>
+                       <li><h:link title="Produkt" outcome="admin_product" value="Produkt" /></li>
+               </ul>
+
+               <ul>
+                       <li><h:link title="Ausloggen" outcome="admin_logout" value="Ausloggen" /></li>
+                       <li><h:link title="Zur Webseite, aber eingeloggt bleiben" outcome="index" value="Webseite aufrufen" /></li>
+               </ul>
+       </div>
+</ui:composition>
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
new file mode 100644 (file)
index 0000000..5c3bb91
--- /dev/null
@@ -0,0 +1,10 @@
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <h:selectOneMenu class="select" id="parent_id">
+               <f:selectItems value="#{controller.allCategories}" var="categoryId" itemValue="#{categoryId.categoryId}" itemLabel="#{categoryId.title}" />
+       </h:selectOneMenu>
+</ui:composition>
index d191bf64191ad990cba371459325c8d31e7320f0..a70734cda7a757a3ca1a59d9b440abbd64ed95f0 100644 (file)
                                <ui:insert name="menu">Default menu</ui:insert>
                        </div>
 
-                       <div id="content" class="left_content">
-                               <ui:insert name="content_header">Default content header</ui:insert>
-                               <ui:insert name="content">Default content</ui:insert>
+                       <div id="content_outer" class="left_content">
+                               <div id="content_header">
+                                       <ui:insert name="content_header">Default content header</ui:insert>
+                               </div>
+                               <div id="content">
+                                       <ui:insert name="content">Default content</ui:insert>
+                               </div>
                        </div>
 
                        <div class="clear"></div>
index 58f5a1e2eb80bfaef54d7efbbd1ac668d837a058..ee4ced7e1fa6ff69ae120a97de9b8ad4af5a33ac 100644 (file)
@@ -3,6 +3,8 @@
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets">
 
+       <ui:define name="title"><ui:insert name="guest_title" class="guest_title" /></ui:define>
+
        <!--
        Show basket if it contains items, else show an empty basket.
        //-->
index 0e4d7180f3ad68c4aeb7f9055371d53f09c97c6d..76a0a2756c13bead6f16e068b59f0537148d96a8 100644 (file)
@@ -11,7 +11,7 @@
                <ul>
                        <li><h:link title="Eingangsseite" outcome="index" value="Home" /></li>
                        <li><h:link title="Zum Warenkorb" outcome="basket" value="Zum Warenkorb" /></li>
-                       <li><h:link title="Sitzung beennden" outcome="bye" value="Sitzung beenden" /></li>
+                       <li><h:link title="Sitzung beennden" outcome="logout" value="Sitzung beenden" /></li>
                </ul>
 
                <div class="menu_header">
index 2e94dad34452766eb4d2d475446020e945741d8f..83bfa265b745dcb32cba8ea458681f2aa39f9fb0 100644 (file)
@@ -4,16 +4,6 @@
                <param-name>javax.faces.PROJECT_STAGE</param-name>
                <param-value>Development</param-value>
        </context-param>
-       <filter>
-               <description>A servlet filter for setting character encoding to UTF-8</description>
-               <filter-name>Utf8ServletFilter</filter-name>
-               <filter-class>org.mxchange.jcoreee.filter.servlet.utf8.Utf8ServletFilter</filter-class>
-       </filter>
-       <filter>
-               <description>A servlet filter for logging</description>
-               <filter-name>Log4jServletFilter</filter-name>
-               <filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
-       </filter>
        <!--
        TODO: No longer used
        <filter>
                <url-pattern>/form_handler/add_item.jsp</url-pattern>
        </filter-mapping>
        //-->
-       <filter-mapping>
-               <filter-name>Log4jServletFilter</filter-name>
-               <url-pattern>/*</url-pattern>
-       </filter-mapping>
-       <filter-mapping>
-               <filter-name>Utf8ServletFilter</filter-name>
-               <url-pattern>/*</url-pattern>
-       </filter-mapping>
        <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
diff --git a/web/admin/category.jsp b/web/admin/category.jsp
deleted file mode 100644 (file)
index 23cca2b..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<%-- 
-       Document   : category
-       Created on : 05.08.2015, 10:51:14
-       Author     : Roland Haeder
---%>
-
-<%--<%@page errorPage="errorHandler.jsp" %>--%>
-<%@page import="org.mxchange.jshopejb.category.Category"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
-<%@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" %>
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
-<jsp:setProperty name="controller" property="session" value="${pageContext.session}" />
-
-<%
-       // TODO: Can be removed later
-       controller.init();
-%>
-
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
-       <head>
-               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-               <link rel="stylesheet" href="${basePath}/style.css" type="text/css" />
-               <title>Pizza-Service - Kategorien</title>
-       </head>
-
-       <body>
-               <div id="header"> 
-                       <div id="title">
-                               <h1>Pizza-Service - Kategorien</h1>
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_menu.jsp" flush="false" />
-
-               <div id="content_outer">
-                       <div id="content_title">
-                               <h2>Kategorien administrieren:</h2>
-                       </div>
-
-                       <div id="content">
-                               <div class="para">
-                                       <form action="${basePath}/form_handler/admin/do_category.jsp" accept-charset="utf-8" id="form" method="post">
-                                       <table class="table">
-                                               <thead>
-                                                       <tr>
-                                                               <th class="table_header_column">
-                                                                       Auswählen:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Bezeichnung:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Elternkategorie:
-                                                               </th>
-                                                       </tr>
-                                               </thead>
-
-                                               <tbody>
-                                                       <c:forEach var="category" items="${controller.allCategoriesIterator}">
-                                                       <tr>
-                                                               <td>
-                                                                       ${category.categoryId}:
-                                                                       <input class="input" type="checkbox" name="categoryId[${category.categoryId}]" value="1" />
-                                                               </td>
-                                                               <td>
-                                                                       ${category.decodedTitle}
-                                                               </td>
-                                                               <td>
-                                                                       ${controller.generateLinkForParent(category)}
-                                                               </td>
-                                                       </tr>
-                                                       </c:forEach>
-
-                                                       <tr>
-                                                               <td colspan="3" class="table_footer">
-                                                                       <input class="reset" type="reset" value="Formular zurücksetzen" />
-                                                                       <input class="submit" type="submit" name="edit" value="Ändern" />
-                                                                       <input class="delete" type="submit" name="delete" value="Löschen" />
-                                                               </td>
-                                                       </tr>
-                                               </tbody>
-                                       </table>
-                                       </form>
-                               </div>
-
-                               <div class="para">
-                                       <form action="${basePath}/form_handler/admin/do_category.jsp" accept-charset="utf-8" id="add_category" method="post">
-                                       <div class="table">
-                                               <div class="table_header">
-                                                       Neue Kategorie hinzufügen:
-                                               </div>
-
-                                               <fieldset id="product_data">
-                                                       <legend>Bitte alle Felder ausfüllen:</legend>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Bezeichnung:
-                                                                       <div class="tiny">(z.B. <em>Pizzen</em>)</div>
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <input class="input" type="text" name="title" size="10" maxlength="255" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Elternkategorie:
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <jsp:include flush="false" page="/WEB-INF/static/admin/admin_parent_category_selection_box.jsp" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-                                               </fieldset>
-
-                                               <div class="table_footer">
-                                                       <input class="reset" type="reset" value="Formular zurücksetzen" />
-                                                       <input class="submit" type="submit" name="add" value="Hinzufügen" />
-                                               </div>
-                                       </div>
-                                       </form>
-                               </div>
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_footer.jsp" flush="false" />
-       </body>
-</html>
diff --git a/web/admin/category.xhtml b/web/admin/category.xhtml
new file mode 100644 (file)
index 0000000..2cd077e
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">Kategorien</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="admin_menu" src="/WEB-INF/templates/admin/admin_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       Kategorien administrieren
+               </ui:define>
+
+               <ui:define name="content">
+                       <div class="para">
+                               <h:form acceptcharset="utf-8" id="form">
+                               <table class="table">
+                                       <thead>
+                                               <tr>
+                                                       <th class="table_header_column">
+                                                               Auswählen:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Bezeichnung:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Elternkategorie:
+                                                       </th>
+                                               </tr>
+                                       </thead>
+
+                                       <tbody>
+                                               <ui:repeat var="category" value="#{controller.allCategories}" rendered="#{category != null}">
+                                                       <h:outputText value="#{category}" />
+                                                       <!--
+                                                       <tr>
+                                                               <td>
+                                                                       #{category.categoryId}:
+                                                                       <h:selectBooleanCheckbox class="input" id="categoryId" binding="#{category.categoryId}" value="true" />
+                                                               </td>
+                                                               <td>
+                                                                       #{category.title}
+                                                               </td>
+                                                               <td>
+                                                                       #{controller.generateLinkForParent(category)}
+                                                               </td>
+                                                       </tr>
+                                                       //-->
+                                               </ui:repeat>
+
+                                               <tr>
+                                                       <td colspan="3" class="table_footer">
+                                                               <h:commandButton class="reset" type="reset" value="Formular zurücksetzen" />
+                                                               <h:commandButton class="submit" type="submit" id="edit" action="#{admin_category.editCategory(category)}" value="Ändern" />
+                                                               <h:commandButton class="delete" type="submit" id="delete" action="#{admin_category.deleteCategory(category)}" value="Löschen" />
+                                                       </td>
+                                               </tr>
+                                       </tbody>
+                               </table>
+                               </h:form>
+                       </div>
+
+                       <div class="para">
+                               <h:form acceptcharset="utf-8" id="add_category">
+                               <div class="table">
+                                       <div class="table_header">
+                                               Neue Kategorie hinzufügen:
+                                       </div>
+
+                                       <fieldset id="product_data">
+                                               <legend>Bitte alle Felder ausfüllen:</legend>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Bezeichnung:
+                                                               <div class="tiny">(z.B. <em>Pizzen</em>)</div>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <input class="input" type="text" name="title" size="10" maxlength="255" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Elternkategorie:
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <ui:include src="/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </fieldset>
+
+                                       <div class="table_footer">
+                                               <h:commandButton class="reset" type="reset" value="Formular zurücksetzen" />
+                                               <h:commandButton class="submit" type="submit" action="#{admin_category.addCategory()}" value="Hinzufügen" />
+                                       </div>
+                               </div>
+                               </h:form>
+                       </div>
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/index.jsp b/web/admin/index.jsp
deleted file mode 100644 (file)
index cd88ed7..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<%-- 
-       Document   : index
-       Created on : 04.08.2015, 10:33:10
-       Author     : Roland Haeder
---%>
-
-<%--<%@page errorPage="errorHandler.jsp" %>--%>
-<%@page import="java.util.Map"%>
-<%@page import="java.util.Iterator"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
-<%@page import="org.mxchange.jshopejb.product.Product"%>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
-       <head>
-               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-               <link rel="stylesheet" href="${basePath}/style.css" type="text/css" />
-               <title>Pizza-Service - Administration</title>
-       </head>
-
-       <body>
-               <div id="header"> 
-                       <div id="title">
-                               <h1>Pizza-Service - Administration</h1>
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_menu.jsp" flush="false" />
-
-               <div id="content_outer">
-                       <div id="content_title">
-                               <h2>Willkommen zur Administration:</h2>
-                       </div>
-
-                       <div id="content">
-                               Einiges kann hier eingestellt werden.
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_footer.jsp" flush="false" />
-       </body>
-</html>
diff --git a/web/admin/index.xhtml b/web/admin/index.xhtml
new file mode 100644 (file)
index 0000000..8dc2e51
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">Willkommen</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="admin_menu" src="/WEB-INF/templates/admin/admin_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       Willkommen zur Administration
+               </ui:define>
+
+               <ui:define name="content">
+                       Einiges kann hier eingestellt werden.
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/product.jsp b/web/admin/product.jsp
deleted file mode 100644 (file)
index aeb5747..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-<%-- 
-       Document   : product
-       Created on : 04.08.2015, 10:55:10
-       Author     : Roland Haeder
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%--<%@page errorPage="errorHandler.jsp" %>--%>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
-<jsp:setProperty name="controller" property="session" value="${pageContext.session}" />
-
-<%
-       // TODO: Can be removed later
-       controller.init();
-%>
-
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
-       <head>
-               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-               <link rel="stylesheet" href="${basePath}/style.css" type="text/css" />
-               <title>Pizza-Service - Produkte</title>
-       </head>
-
-       <body>
-               <div id="header"> 
-                       <div id="title">
-                               <h1>Pizza-Service - Produkte</h1>
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_menu.jsp" flush="false" />
-
-               <div id="content_outer">
-                       <div id="content_title">
-                               <h2>Diese Produkte wurden eingestellt:</h2>
-                       </div>
-
-                       <div id="content">
-                               <div class="para">
-                                       <form action="${basePath}/form_handler/admin/do_product.jsp" accept-charset="utf-8" id="form" method="post">
-                                       <table class="table">
-                                               <thead>
-                                                       <tr>
-                                                               <th class="table_header_column">
-                                                                       Produktnummer:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Produktbezeichnung:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Einzelpreis:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Kategorie:
-                                                               </th>
-                                                               <th class="table_header_column">
-                                                                       Verfügbar:
-                                                               </th>
-                                                       </tr>
-                                               </thead>
-
-                                               <tbody>
-                                                       <c:forEach var="product" items="${controller.allProductsIterator}">
-                                                       <tr>
-                                                               <td>
-                                                                       ${product.itemId}:
-                                                                       <input class="input" type="checkbox" name="itemId[${product.itemId}]" value="1" />
-                                                               </td>
-                                                               <td>
-                                                                       ${product.title}
-                                                               </td>
-                                                               <td>
-                                                                       ${product.price}
-                                                               </td>
-                                                               <td>
-                                                                       ${controller.getPrintableProduktCategory(product)}
-                                                               </td>
-                                                               <td>
-                                                                       ${controller.getPrintableProductAvailability(product)}
-                                                               </td>
-                                                       </tr>
-                                                       </c:forEach>
-                                                       <tr>
-                                                               <td colspan="5" class="table_footer">
-                                                                       <input class="reset" type="reset" value="Formular zurücksetzen" />
-                                                                       <input class="submit" type="submit" name="edit" value="Ändern" />
-                                                                       <input class="delete" type="submit" name="delete" value="Löschen" />
-                                                               </td>
-                                                       </tr>
-                                               </tbody>
-                                       </table>
-                                       </form>
-                               </div>
-
-                               <div class="para">
-                                       <form action="${basePath}/form_handler/admin/do_product.jsp" accept-charset="utf-8" id="add" method="post">
-                                       <div class="table">
-                                               <div class="table_header">
-                                                       Neues Produkt hinzufügen:
-                                               </div>
-
-                                               <fieldset id="product_data">
-                                                       <legend>Bitte alle Felder ausfüllen:</legend>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Produktbezeichnung:
-                                                                       <div class="tiny">(z.B. <em>Pizza Italia</em>)</div>
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <input class="input" type="text" name="title" size="10" maxlength="255" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Einzelpreis:
-                                                                       <div class="tiny">(z.B. <em>50.0</em>)</div>
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <input class="input" type="text" name="price" size="10" maxlength="255" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Kategorie:
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <jsp:include flush="false" page="/WEB-INF/static/admin/admin_category_selection_box.jsp" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       Verfügbar:
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <select class="select" name="available" size="1">
-                                                                               <option value="true">Ja</option>
-                                                                               <option value="false">Nein</option>
-                                                                       </select>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-                                               </fieldset>
-
-                                               <div class="table_footer">
-                                                       <input class="reset" type="reset" value="Formular zurücksetzen" />
-                                                       <input class="submit" type="submit" name="add" value="Hinzufügen" />
-                                               </div>
-                                       </div>
-                                       </form>
-                               </div>
-
-                               <div class="para">
-                                       Hinweise zum Hinzufügen von Produkten:
-                                       <ul>
-                                               <li>Beim Preis keine Währungszeichen (wie &euro; usw.) eingeben.</li>
-                                               <li>Kommastellen mit Punkt, nicht mit Komma abtrennen.</li>
-                                               <li>Keine Tausendertrenner verwenden, auch keine Leerschritte.</li>
-                                       </ul>
-                               </div>
-                       </div>
-               </div>
-
-               <jsp:include page="/WEB-INF/static/admin/admin_footer.jsp" flush="false" />
-       </body>
-</html>
diff --git a/web/admin/product.xhtml b/web/admin/product.xhtml
new file mode 100644 (file)
index 0000000..cfb743a
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">Produkte</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="admin_menu" src="/WEB-INF/templates/admin/admin_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       Diese Produkte wurden eingestellt
+               </ui:define>
+
+               <ui:define name="content">
+                       <div class="para">
+                               <h:form acceptcharset="utf-8" id="form">
+                               <table class="table">
+                                       <thead>
+                                               <tr>
+                                                       <th class="table_header_column">
+                                                               Produktnummer:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Produktbezeichnung:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Einzelpreis:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Kategorie:
+                                                       </th>
+                                                       <th class="table_header_column">
+                                                               Verfügbar:
+                                                       </th>
+                                               </tr>
+                                       </thead>
+
+                                       <tbody>
+                                               <ui:repeat var="product" value="#{admin_product.allProducts}" rendered="#{product != null}">
+                                               <tr>
+                                                       <td>
+                                                               #{product.itemId}:
+                                                               <h:selectBooleanCheckbox class="input" id="item_id" binding="#{product.itemId}" value="true" />
+                                                       </td>
+                                                       <td>
+                                                               #{product.title}
+                                                       </td>
+                                                       <td>
+                                                               #{product.price}
+                                                       </td>
+                                                       <td>
+                                                               ${controller.getPrintableProduktCategory(product)}
+                                                       </td>
+                                                       <td>
+                                                               ${controller.getPrintableProductAvailability(product)}
+                                                       </td>
+                                               </tr>
+                                               </ui:repeat>
+                                               <tr>
+                                                       <td colspan="5" class="table_footer">
+                                                               <h:commandButton class="reset" type="reset" value="Formular zurücksetzen" />
+                                                               <h:commandButton class="submit" type="submit" id="edit" action="#{admin_product.ediProduct(product)}" value="Ändern" />
+                                                               <h:commandButton class="delete" type="submit" id="delete" action="#{admin_category.deleteProduct(product)}" value="Löschen" />
+                                                       </td>
+                                               </tr>
+                                       </tbody>
+                               </table>
+                               </h:form>
+                       </div>
+
+                       <div class="para">
+                               <h:form acceptcharset="utf-8" id="add_category">
+                               <div class="table">
+                                       <div class="table_header">
+                                               Neues Produkt hinzufügen:
+                                       </div>
+
+                                       <fieldset id="product_data">
+                                               <legend>Bitte alle Felder ausfüllen:</legend>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Produktbezeichnung:
+                                                               <div class="tiny">(z.B. <em>Pizza Italia</em>)</div>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText class="input" id="title" size="10" maxlength="255" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Einzelpreis:
+                                                               <div class="tiny">(z.B. <em>50.0</em>)</div>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText class="input" id="price" size="10" maxlength="255" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Kategorie:
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <ui:include src="/WEB-INF/templates/admin/admin_category_selection_box.tpl" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               Verfügbar:
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <select class="select" name="available" size="1">
+                                                                       <option value="true">Ja</option>
+                                                                       <option value="false">Nein</option>
+                                                               </select>
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </fieldset>
+
+                                       <div class="table_footer">
+                                               <input class="reset" type="reset" value="Formular zurücksetzen" />
+                                               <input class="submit" type="submit" name="add" value="Hinzufügen" />
+                                       </div>
+                               </div>
+                               </h:form>
+                       </div>
+
+                       <div class="para">
+                               Hinweise zum Hinzufügen von Produkten:
+                               <ul>
+                                       <li>Beim Preis keine Währungszeichen (wie EUR usw.) eingeben.</li>
+                                       <li>Kommastellen mit Punkt, nicht mit Komma abtrennen.</li>
+                                       <li>Keine Tausendertrenner verwenden, auch keine Leerschritte.</li>
+                               </ul>
+                       </div>
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
index 198e37cb54b65b3bb878dba25228faaa6f6edffa..bc320508aa85910d6ffc3eebd86406541855af58 100644 (file)
@@ -27,7 +27,7 @@
                        </div>
 
                        <div class="para">
-                               <h:link id="customer_lost_password" outcome="customer_register" title="Passwort wiederherstellen" value="Passwort vergessen?" />
+                               <h:link id="customer_lost_password" outcome="customer_lost_passwd" title="Passwort wiederherstellen" value="Passwort vergessen?" />
                        </div>
                </ui:define>
 
index 74acebc078e20b1208a5272fe0f0cc263d9d30f0..c8885c1e8c73e53ac95ec546bbac196cb544eccf 100644 (file)
@@ -18,7 +18,7 @@
                </ui:define>
 
                <ui:define name="content_header">
-                       Eingangsseite (dummy)
+                       Willkommen zum Pizza-Service
                </ui:define>
 
                <ui:define name="content">
 
                                        <tbody>
                                                <ui:repeat var="product" value="#{controller.availableProducts}">
-                                                       <!-- Cache isAdded call to reduce calls //-->
-                                                       <c:set var="isAdded" value="#{basket.isAdded(product)}" />
 
-                                                       <ui:fragment rendered="#{isAdded == true}">
+                                                       <f:viewAction action="#{basket.setCurrentProduct(product)}" />
+
+                                                       <ui:fragment rendered="#{basket.isCurrentProductAdded() == true}">
                                                                <tr>
                                                                        <td class="table_data_column">
                                                                                <h:link outcome="basket" title="Zum Warenkorb" value="Warenkorb" />
@@ -96,7 +96,7 @@
                                                                </tr>
                                                        </ui:fragment>
 
-                                                       <ui:fragment rendered="#{isAdded == false}">
+                                                       <ui:fragment rendered="#{basket.isCurrentProductAdded() == false}">
                                                                <tr>
                                                                        <td class="table_data_column">
                                                                                <h:commandButton class="submit" id="add" value="Hinzufügen" action="#{basket.addToBasket(product)}" />
index 57b5048d5fea92510a74ca0e1ca2c3b0674c1bc8..27d10449ddcde0f88019fffc7aabd82cfd906ef2 100644 (file)
@@ -133,7 +133,11 @@ ul.footer_nav li {
 .table_header {
        text-align: center;
        font-weight: bold;
-       font-size: 20px;
+}
+
+#content_header {
+       font-weight: bold;
+       font-size: 18px;
 }
 
 .table_header_column {
index e84f73f1483ba4f1141be209b6b9c0eee9bb7e8f..46708d589f38bf09d1b8c844fa5ea9ee64266574 100644 (file)
@@ -6,18 +6,18 @@
          >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
-               <ui:define name="title">Allgemeine Gesch&auml;ftsbedingungen</ui:define>
+               <ui:define name="title">Allgemeine Geschäftsbedingungen</ui:define>
 
                <ui:define name="menu">
                        <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
                </ui:define>
 
                <ui:define name="content_header">
-                       Allgemeine Gesch&auml;ftsbedingungen
+                       Allgemeine Geschäftsbedingungen
                </ui:define>
 
                <ui:define name="content">
-                       Hier kommen die allgemeinen Gesch&auml;ftsbedingungen hin.
+                       Hier kommen die allgemeinen Geschäftsbedingungen hin.
                </ui:define>
 
                <ui:define name="footer">