From: Roland Häder <roland@mxchange.org>
Date: Tue, 20 Mar 2018 23:34:47 +0000 (+0100)
Subject: Only product:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8cc287b5149fb56e0747c7992dd0758e01a30b32;p=jfinancials-war.git

Only product:
- web controller expanded with age group ("new" enumeration), product size and number
- also changed Float to BigDecimal for precision reasons
- always filter/sort agains entity, not an entity's property
- used more MessageFormat.format()
- added converter for agegroup enumeration
- changed/updated copyright year to Freesoftware Foundation

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java
index 6082653e..47eb6591 100644
--- a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jfinancials.beans.generic_product;
 
+import java.math.BigDecimal;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
@@ -32,6 +33,7 @@ import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.product.AdminProductSessionBeanRemote;
 import org.mxchange.jproduct.model.product.GenericProduct;
 import org.mxchange.jproduct.model.product.Product;
+import org.mxchange.jproduct.model.product.agegroup.AgeGroup;
 
 /**
  * Main application class
@@ -54,6 +56,17 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	@Any
 	private Event<AddedProductEvent> addedProductEvent;
 
+	/**
+	 * Remote bean for products
+	 */
+	@EJB (lookup = "java:global/jfinancials-ejb/adminProduct!org.mxchange.jproduct.model.product.AdminProductSessionBeanRemote")
+	private AdminProductSessionBeanRemote adminProductBean;
+
+	/**
+	 * Product's age group
+	 */
+	private AgeGroup productAgeGroup;
+
 	/**
 	 * Available
 	 */
@@ -64,6 +77,12 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 */
 	private Category productCategory;
 
+	/**
+	 * General product controller
+	 */
+	@Inject
+	private FinancialProductWebRequestController productController;
+
 	/**
 	 * Product's price currency code like EUR or USD
 	 */
@@ -72,7 +91,12 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	/**
 	 * Product's gross price
 	 */
-	private Float productGrossPrice;
+	private BigDecimal productGrossPrice;
+
+	/**
+	 * I18n key of product
+	 */
+	private String productI18nKey;
 
 	/**
 	 * Product's manufacturing/producing company
@@ -82,34 +106,27 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	/**
 	 * Product's net price
 	 */
-	private Float productNetPrice;
+	private BigDecimal productNetPrice;
 
 	/**
-	 * Remote bean for products
+	 * Product number
 	 */
-	@EJB (lookup = "java:global/jfinancials-ejb/adminProduct!org.mxchange.jproduct.model.product.AdminProductSessionBeanRemote")
-	private AdminProductSessionBeanRemote adminProductBean;
+	private Long productNumber;
 
 	/**
-	 * General product controller
+	 * Product size (for shoes, clothings)
 	 */
-	@Inject
-	private FinancialProductWebRequestController productController;
+	private String productSize;
 
 	/**
 	 * Product's tax rate
 	 */
-	private Float productTaxRate;
-
-	/**
-	 * I18n key of product
-	 */
-	private String productI18nKey;
+	private BigDecimal productTaxRate;
 
 	/**
 	 * Product's unit amount
 	 */
-	private Float productUnitAmount;
+	private BigDecimal productUnitAmount;
 
 	/**
 	 * Product's i18n key
@@ -157,6 +174,24 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 		this.clear();
 	}
 
+	/**
+	 * Getter for product's age group
+	 * <p>
+	 * @return Product's age group
+	 */
+	public AgeGroup getProductAgeGroup () {
+		return this.productAgeGroup;
+	}
+
+	/**
+	 * Setter for product's age group
+	 * <p>
+	 * @param productAgeGroup Product's age group
+	 */
+	public void setProductAgeGroup (final AgeGroup productAgeGroup) {
+		this.productAgeGroup = productAgeGroup;
+	}
+
 	/**
 	 * Getter for product's available
 	 * <p>
@@ -216,7 +251,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @return Product's gross price
 	 */
-	public Float getProductGrossPrice () {
+	public BigDecimal getProductGrossPrice () {
 		return this.productGrossPrice;
 	}
 
@@ -225,10 +260,28 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @param productGrossPrice Product's gross price
 	 */
-	public void setProductGrossPrice (final Float productGrossPrice) {
+	public void setProductGrossPrice (final BigDecimal productGrossPrice) {
 		this.productGrossPrice = productGrossPrice;
 	}
 
+	/**
+	 * Getter for product unit's i18n key
+	 * <p>
+	 * @return Product's i18n key
+	 */
+	public String getProductI18nKey () {
+		return this.productI18nKey;
+	}
+
+	/**
+	 * Setter for product unit's i18n key
+	 * <p>
+	 * @param productI18nKey Product's i18n key
+	 */
+	public void setProductI18nKey (final String productI18nKey) {
+		this.productI18nKey = productI18nKey;
+	}
+
 	/**
 	 * Getter for product's manufacturing/producing company
 	 * <p>
@@ -252,7 +305,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @return Product's net price
 	 */
-	public Float getProductNetPrice () {
+	public BigDecimal getProductNetPrice () {
 		return this.productNetPrice;
 	}
 
@@ -261,44 +314,62 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @param productNetPrice Product's net price
 	 */
-	public void setProductNetPrice (final Float productNetPrice) {
+	public void setProductNetPrice (final BigDecimal productNetPrice) {
 		this.productNetPrice = productNetPrice;
 	}
 
 	/**
-	 * Getter for product's tax rate
+	 * Getter for product's number
 	 * <p>
-	 * @return Product's tax rate
+	 * @return Product's number
 	 */
-	public Float getProductTaxRate () {
-		return this.productTaxRate;
+	public Long getProductNumber () {
+		return this.productNumber;
 	}
 
 	/**
-	 * Setter for product's tax rate
+	 * Setter for product's number
 	 * <p>
-	 * @param productTaxRate Product's tax rate
+	 * @param productNumber Product's number
 	 */
-	public void setProductTaxRate (final Float productTaxRate) {
-		this.productTaxRate = productTaxRate;
+	public void setProductNumber (final Long productNumber) {
+		this.productNumber = productNumber;
 	}
 
 	/**
-	 * Getter for product unit's i18n key
+	 * Getter for product's size
 	 * <p>
-	 * @return Product's i18n key
+	 * @return Product's size
 	 */
-	public String getProductI18nKey () {
-		return this.productI18nKey;
+	public String getProductSize () {
+		return this.productSize;
 	}
 
 	/**
-	 * Setter for product unit's i18n key
+	 * Setter for product's size
 	 * <p>
-	 * @param productI18nKey Product's i18n key
+	 * @param productSize Product's size
 	 */
-	public void setProductI18nKey (final String productI18nKey) {
-		this.productI18nKey = productI18nKey;
+	public void setProductSize (final String productSize) {
+		this.productSize = productSize;
+	}
+
+	/**
+	 * Getter for product's tax rate
+	 * <p>
+	 * @return Product's tax rate
+	 */
+	public BigDecimal getProductTaxRate () {
+		return this.productTaxRate;
+	}
+
+	/**
+	 * Setter for product's tax rate
+	 * <p>
+	 * @param productTaxRate Product's tax rate
+	 */
+	public void setProductTaxRate (final BigDecimal productTaxRate) {
+		this.productTaxRate = productTaxRate;
 	}
 
 	/**
@@ -306,7 +377,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @return Product's unit amount
 	 */
-	public Float getProductUnitAmount () {
+	public BigDecimal getProductUnitAmount () {
 		return this.productUnitAmount;
 	}
 
@@ -315,7 +386,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * <p>
 	 * @param productUnitAmount Product's unit amount
 	 */
-	public void setProductUnitAmount (final Float productUnitAmount) {
+	public void setProductUnitAmount (final BigDecimal productUnitAmount) {
 		this.productUnitAmount = productUnitAmount;
 	}
 
@@ -331,7 +402,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	/**
 	 * Setter for product unit's i18n key
 	 * <p>
-	 * @param productI18nKey Product's i18n key
+	 * @param productUnitI18nKey Product unit's i18n key
 	 */
 	public void setProductUnitI18nKey (final String productUnitI18nKey) {
 		this.productUnitI18nKey = productUnitI18nKey;
@@ -341,12 +412,15 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 	 * Clears this bean (example: product has been added)
 	 */
 	private void clear () {
+		this.setProductAgeGroup(null);
 		this.setProductAvailability(Boolean.FALSE);
 		this.setProductCategory(null);
 		this.setProductGrossPrice(null);
 		this.setProductI18nKey(null);
-		this.setProductNetPrice(null);
 		this.setProductManufacturer(null);
+		this.setProductNetPrice(null);
+		this.setProductNumber(null);
+		this.setProductSize(null);
 		this.setProductTaxRate(null);
 		this.setProductUnitAmount(null);
 		this.setProductUnitI18nKey(null);
@@ -362,8 +436,11 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 		final Product product = new GenericProduct(this.getProductI18nKey(), this.getProductGrossPrice(), this.getProductCurrencyCode(), this.getProductCategory(), this.getProductAvailability(), this.getProductUnitAmount(), this.getProductUnitI18nKey());
 
 		// Set all optional fields
-		product.setProductNetPrice(this.getProductNetPrice());
+		product.setProductAgeGroup(this.getProductAgeGroup());
 		product.setProductManufacturer(this.getProductManufacturer());
+		product.setProductNumber(this.getProductNumber());
+		product.setProductNetPrice(this.getProductNetPrice());
+		product.setProductSize(this.getProductSize());
 		product.setProductTaxRate(this.getProductTaxRate());
 
 		// Return it
diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestController.java
index c419bae0..2a9006c9 100644
--- a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestController.java
+++ b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestBean.java
index ba765fdd..f4506088 100644
--- a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestBean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
@@ -128,7 +128,7 @@ public class FinancialProductWebRequestBean extends BaseFinancialsBean implement
 			throw new NullPointerException("productId is null"); //NOI18N
 		} else if (productId < 1) {
 			// Throw IAE
-			throw new IllegalArgumentException("productId=" + productId + " is invalid"); //NOI18N //NOI18N
+			throw new IllegalArgumentException(MessageFormat.format("productId={0} is invalid", productId)); //NOI18N //NOI18N
 		} else if (!this.productCache.containsKey(productId)) {
 			// Not found
 			throw new ProductNotFoundException(productId);
diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestController.java
index 52490c10..8ef9f6dd 100644
--- a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestController.java
+++ b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java
index 4c8a31ae..65f0940c 100644
--- a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestController.java
index be189896..937629bd 100644
--- a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestController.java
+++ b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestBean.java
index 6fec0526..20d51e3b 100644
--- a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestBean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestController.java
index b2bfca38..780f02e6 100644
--- a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestController.java
+++ b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/converter/age_group/FinancialAgeGroupConverter.java b/src/java/org/mxchange/jfinancials/converter/age_group/FinancialAgeGroupConverter.java
new file mode 100644
index 00000000..871848bd
--- /dev/null
+++ b/src/java/org/mxchange/jfinancials/converter/age_group/FinancialAgeGroupConverter.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017, 2018 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.converter.age_group;
+
+import javax.faces.convert.EnumConverter;
+import javax.faces.convert.FacesConverter;
+import org.mxchange.jproduct.model.product.agegroup.AgeGroup;
+
+/**
+ * A converter for age groups
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter ("AgeGroupConverter")
+public class FinancialAgeGroupConverter extends EnumConverter {
+
+	/**
+	 * Default constructor which calls the super constructor with the proper
+	 * enumeration as class type.
+	 */
+	public FinancialAgeGroupConverter () {
+		// Call other constructor with class type
+		super(AgeGroup.class);
+	}
+
+}
diff --git a/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java b/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java
index 68452ea8..ee8024f6 100644
--- a/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java
+++ b/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java b/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java
index 025ec3a1..bf167ab7 100644
--- a/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java
+++ b/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java b/src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java
index dd633d76..8d30c5ed 100644
--- a/src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java
+++ b/src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java b/src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java
index 4da80994..79477eca 100644
--- a/src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java
+++ b/src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/web/WEB-INF/product-links.jsf.taglib.xml b/web/WEB-INF/product-links.jsf.taglib.xml
index e7a9fc1c..151b235b 100644
--- a/web/WEB-INF/product-links.jsf.taglib.xml
+++ b/web/WEB-INF/product-links.jsf.taglib.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright (C) 2017 Roland Häder
+Copyright (C) 2017, 2018 Free Software Foundation
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
diff --git a/web/WEB-INF/product.jsf.taglib.xml b/web/WEB-INF/product.jsf.taglib.xml
index 609ca839..bbe8e8d9 100644
--- a/web/WEB-INF/product.jsf.taglib.xml
+++ b/web/WEB-INF/product.jsf.taglib.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright (C) 2017 Roland Häder
+Copyright (C) 2017, 2018 Free Software Foundation
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
diff --git a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
index c6abe4d7..9a032154 100644
--- a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
+++ b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
@@ -26,7 +26,7 @@
 				<f:selectItems value="#{categoryController.allCategories()}" var="category" itemValue="#{category}" itemLabel="#{beanHelper.renderProductCategory(category)}" />
 			</p:selectOneMenu>
 
-			<p:outputLabel for="productI18nKey" value="#{project.ADMIN_ENTER_PRODUCT_I18N_KEY}" />
+			<p:outputLabel for="productI18nKey" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY}" />
 			<p:inputText
 				id="productI18nKey"
 				value="#{adminProductController.productI18nKey}"
@@ -34,12 +34,43 @@
 				maxlength="255"
 				required="true"
 				requiredMessage="#{project.ADMIN_PRODUCT_I18N_KEY_REQUIRED}"
-				title="#{project.ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE}"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY_TITLE}"
 				validatorMessage="#{project.ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED}"
 				>
 				<f:validator validatorId="GenericProductValidator" />
 			</p:inputText>
 
+			<p:outputLabel for="productNumber" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER}" />
+			<p:inputText
+				id="productNumber"
+				value="#{adminProductController.productNumber}"
+				size="10"
+				maxlength="20"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE}"
+				/>
+
+			<p:outputLabel for="productAgeGroup" value="#{project.ADMIN_SELECT_PRODUCT_AGE_GROUP}" />
+			<p:selectOneMenu
+				id="productAgeGroup"
+				value="#{adminProductController.productAgeGroup}"
+				filter="true"
+				filterMatchMode="contains"
+				title="#{project.ADMIN_SELECT_PRODUCT_AGE_GROUP_TITLE}"
+				>
+				<f:converter converterId="AgeGroupConverter" />
+				<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+				<f:selectItems value="#{dataController.ageGroups}" var="ageGroup" itemValue="#{ageGroup}" itemLabel="#{project[ageGroup.i18nKey]}" />
+			</p:selectOneMenu>
+
+			<p:outputLabel for="productSize" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_SIZE}" />
+			<p:inputText
+				id="productSize"
+				value="#{adminProductController.productSize}"
+				size="5"
+				maxlength="10"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_SIZE_TITLE}"
+				/>
+
 			<p:outputLabel for="productManufacturer" value="#{project.ADMIN_ASSIGN_PRODUCT_MANUFACTURER}" />
 			<p:selectOneMenu
 				id="productManufacturer"
@@ -62,38 +93,38 @@
 				title="#{project.ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE}"
 				/>
 
-			<p:outputLabel value="#{project.ADMIN_ENTER_PRODUCT_PRICE}" />
+			<p:outputLabel value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_PRICE}" />
 			<product:inputProductPricePanelGrid targetController="#{adminProductController}" />
 
-			<p:outputLabel for="productCurrencyCode" value="#{project.ADMIN_ENTER_PRODUCT_CURRENCY_CODE}" />
+			<p:outputLabel for="productCurrencyCode" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE}" />
 			<p:inputText
 				id="productCurrencyCode"
 				value="#{adminProductController.productCurrencyCode}"
 				size="3"
 				maxlength="3"
-				title="#{project.ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE}"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE_TITLE}"
 				required="true"
 				requiredMessage="#{project.ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED}"
 				/>
 
-			<p:outputLabel for="productUnitAmount" value="#{project.ADMIN_ENTER_PRODUCT_UNIT_AMOUNT}" />
+			<p:outputLabel for="productUnitAmount" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT}" />
 			<p:inputNumber
 				id="productUnitAmount"
 				value="#{adminProductController.productUnitAmount}"
 				decimalSeparator=","
 				thousandSeparator="."
-				title="#{project.ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE}"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE}"
 				required="true"
 				requiredMessage="#{project.ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED}"
 				/>
 
-			<p:outputLabel for="productUnitI18nKey" value="#{project.ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY}" />
+			<p:outputLabel for="productUnitI18nKey" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY}" />
 			<p:inputText
 				id="productUnitI18nKey"
 				value="#{adminProductController.productUnitI18nKey}"
 				size="10"
 				maxlength="255"
-				title="#{project.ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY_TITLE}"
+				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
 				required="true"
 				requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
 				/>
diff --git a/web/admin/generic_product/admin_generic_product_list.xhtml b/web/admin/generic_product/admin_generic_product_list.xhtml
index 0b9e47f6..94511ae8 100644
--- a/web/admin/generic_product/admin_generic_product_list.xhtml
+++ b/web/admin/generic_product/admin_generic_product_list.xhtml
@@ -56,7 +56,7 @@
 					<h:outputText value="#{local[product.productI18nKey]}" title="#{product.productI18nKey}" />
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_HEADER_ASSIGNED_PRODUCT_CATEGORY}" sortBy="#{product.productCategory.categoryI18nKey}" filterBy="#{product.productCategory}" filterMatchMode="in">
+				<p:column headerText="#{project.ADMIN_HEADER_ASSIGNED_PRODUCT_CATEGORY}" sortBy="#{product.productCategory}" filterBy="#{product.productCategory}" filterMatchMode="in">
 					<f:facet name="filter">
 						<p:selectCheckboxMenu
 							filter="true"
@@ -77,18 +77,18 @@
 					</p:link>
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_GROSS_PRICE}" sortBy="#{product.productAvailability}" filterBy="#{product.productGrossPrice}" filterMatchMode="choose">
+				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_GROSS_PRICE}" sortBy="#{product.productAvailability}" filterBy="#{product.productGrossPrice}" filterMatchMode="in">
 					<h:outputText value="#{product.productGrossPrice}">
 						<!-- @TODO Hard-coded EUR again -->
 						<f:convertNumber type="currency" currencyCode="EUR" />
 					</h:outputText>
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_AVAILABILITY}" sortBy="#{product.productAvailability}" filterBy="#{product.productAvailability}" filterMatchMode="">
+				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_AVAILABILITY}" sortBy="#{product.productAvailability}" filterBy="#{product.productAvailability}" filterMatchMode="equals">
 					<h:outputText value="#{product.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME}" sortBy="#{product.productManufacturer.companyName}" filterBy="#{product.productManufacturer}" filterMatchMode="in">
+				<p:column headerText="#{project.ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME}" sortBy="#{product.productManufacturer}" filterBy="#{product.productManufacturer}" filterMatchMode="in">
 					<f:facet name="filter">
 						<p:selectCheckboxMenu
 							filter="true"
diff --git a/web/admin/product_category/admin_product_category_list.xhtml b/web/admin/product_category/admin_product_category_list.xhtml
index e5a0c805..74bc2ac6 100644
--- a/web/admin/product_category/admin_product_category_list.xhtml
+++ b/web/admin/product_category/admin_product_category_list.xhtml
@@ -56,7 +56,7 @@
 					<h:outputText value="#{local[category.categoryI18nKey]}" title="#{category.categoryI18nKey}" />
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_HEADER_ASSIGNED_PARENT_CATEGORY}" sortBy="#{category.parentCategory.categoryI18nKey}" filterBy="#{category.parentCategory}" filterMatchMode="in">
+				<p:column headerText="#{project.ADMIN_HEADER_ASSIGNED_PARENT_CATEGORY}" sortBy="#{category.parentCategory}" filterBy="#{category.parentCategory}" filterMatchMode="in">
 					<f:facet name="filter">
 						<p:selectCheckboxMenu
 							filter="true"