]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Sun, 2 Oct 2022 11:53:45 +0000 (13:53 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 2 Oct 2022 11:53:45 +0000 (13:53 +0200)
- bypassDuplicateI18nKey can be NULL when not set in JSF tag

src/java/org/mxchange/jfinancials/validator/generic_product/FinancialsGenericProductValidator.java
src/java/org/mxchange/jfinancials/validator/product_category/FinancialsProductCategoryValidator.java

index 4a18fb55e050c5113a8ca0e3bfa9ebfa576c6cd2..4fa2ba38939997c0c795b1047b1adfdc9214c694 100644 (file)
@@ -82,6 +82,12 @@ public class FinancialsGenericProductValidator extends BaseStringValidator {
                        PRODUCT_LIST_CONTROLLER = CDI.current().select(FinancialsProductListWebViewBean.class).get();
                }
 
+               // Is bypassDuplicateI18nKey set?
+               if (null == this.bypassDuplicateI18nKey) {
+                       // By default is not bypass
+                       this.setBypassDuplicateI18nKey(Boolean.FALSE);
+               }
+
                // Check, if the name has already been used
                if (!this.bypassDuplicateI18nKey && PRODUCT_LIST_CONTROLLER.isProductI18nKeyAdded((String) productI18nKey)) {
                        // Create message
index 307fbadb400e948d02beea70c65ae1a9def442ea..0283c04c0e3d8ca5bfbfdd74f7d72f8eaff7dc03 100644 (file)
@@ -82,6 +82,12 @@ public class FinancialsProductCategoryValidator extends BaseStringValidator {
                        CATEGORY_LIST_CONTROLLER = CDI.current().select(FinancialsCategoryListWebViewBean.class).get();
                }
 
+               // Is bypassDuplicateI18nKey set?
+               if (null == this.bypassDuplicateI18nKey) {
+                       // By default is not bypass
+                       this.setBypassDuplicateI18nKey(Boolean.FALSE);
+               }
+
                // Check, if the name has already been used
                if (!this.bypassDuplicateI18nKey && CATEGORY_LIST_CONTROLLER.isCategoryI18nKeyAdded((String) categoryI18nKey)) {
                        // Create message