]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Only product:
authorRoland Häder <roland@mxchange.org>
Tue, 20 Mar 2018 23:34:47 +0000 (00:34 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 20 Mar 2018 23:34:47 +0000 (00:34 +0100)
- 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>
18 files changed:
src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestController.java
src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/generic_product/FinancialProductWebRequestController.java
src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestController.java
src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/product_category/FinancialCategoryWebRequestController.java
src/java/org/mxchange/jfinancials/converter/age_group/FinancialAgeGroupConverter.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java
src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java
src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java
src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java
web/WEB-INF/product-links.jsf.taglib.xml
web/WEB-INF/product.jsf.taglib.xml
web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
web/admin/generic_product/admin_generic_product_list.xhtml
web/admin/product_category/admin_product_category_list.xhtml

index 6082653ea5a29fa89a7595b836fd9758389958c4..47eb659180862d1072405281aadd88dfc1c857b3 100644 (file)
@@ -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
index c419bae08f0e83def76799310f505e12e7b04dfe..2a9006c9a79dee8110b96e5ddde1b1664f237f8a 100644 (file)
@@ -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
index ba765fddbec8cc7bedac57ded61b0eca9c53ca31..f45060881daacdbb166660aa9991975ab1820533 100644 (file)
@@ -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);
index 52490c107453efab2d5873e010b9b4b2b6199e5a..8ef9f6dd8a2702a037402f8c14d24b9f1779a080 100644 (file)
@@ -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
index 4c8a31ae12605c3aaace81d7abf22aee066e35a0..65f0940c999b23e6140636a8466a5c8ee8aef038 100644 (file)
@@ -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
index be189896c7cf22afe41584221ee23212106ee491..937629bd911646c11f3116c3702ace55531dda77 100644 (file)
@@ -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
index 6fec05267c67a07e4f046921805064721402f7dc..20d51e3bcb13d227bc57c2e94ea8de18f3f68f3b 100644 (file)
@@ -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
index b2bfca38d046cd6fb9d6661b7a93db7938330943..780f02e60485ef4a5eeba4f7bf937c0aed944d8a 100644 (file)
@@ -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 (file)
index 0000000..871848b
--- /dev/null
@@ -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);
+       }
+
+}
index 68452ea877e049e17b3a754ef617f219a4e164de..ee8024f694d475759be209296e17af2e2c00fb29 100644 (file)
@@ -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
index 025ec3a12d019d9e0fb59b3076a5b4d742ff1ad6..bf167ab74c63d977152746febf28a67a1f488407 100644 (file)
@@ -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
index dd633d7690d709afc55277b555e1404e32a30e88..8d30c5ed8b8e490e73f3bdf7ee297ba826161788 100644 (file)
@@ -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
index 4da809945beb6e4d997a6e78acd9e03a930e9d17..79477ecab14f6bab64003fee62abd410c08dacd6 100644 (file)
@@ -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
index e7a9fc1c9976002e2115292d4585e66dc44ae9e0..151b235b65ab5fe7e5f194e65f1a7b17cabd788b 100644 (file)
@@ -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
index 609ca8398d3218bcacca031a69a958170061931c..bbe8e8d9d978eca21b76e8d4881907f2af2b9cab 100644 (file)
@@ -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
index c6abe4d70d69ed5f32261ae041a8d2a6c15a2945..9a0321541a3cf4be22551f4aadfd22d1321d781c 100644 (file)
@@ -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}"
                                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"
                                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}"
                                />
index 0b9e47f6956813f63bf164641ec68169c02b0bb0..94511ae8d6da2c600ef1d43a10badb2411539536 100644 (file)
@@ -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"
                                        </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"
index e5a0c805f1bd4034d5cafe5d0d9b664a93847609..74bc2ac6d30dcf617308cb8aecabfdd4723ae2ec 100644 (file)
@@ -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"