From: Roland Häder Date: Sun, 19 Apr 2020 00:10:29 +0000 (+0200) Subject: Product-only: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=671a44105baedbf8e2381072f69c79fa61a82bc6;p=jfinancials-war.git Product-only: - replaced FaceletException with FacesException Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/action/FinancialAdminGenericProductActionWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/generic_product/action/FinancialAdminGenericProductActionWebViewBean.java index cad332b4..ba2b0a0e 100644 --- a/src/java/org/mxchange/jfinancials/beans/generic_product/action/FinancialAdminGenericProductActionWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/generic_product/action/FinancialAdminGenericProductActionWebViewBean.java @@ -21,6 +21,7 @@ import java.text.MessageFormat; import javax.ejb.EJB; import javax.enterprise.event.Event; import javax.enterprise.inject.Any; +import javax.faces.FacesException; import javax.faces.view.ViewScoped; import javax.faces.view.facelets.FaceletException; import javax.inject.Inject; @@ -177,7 +178,7 @@ public class FinancialAdminGenericProductActionWebViewBean extends BaseFinancial // Is product i18n key already used? if (this.productListController.isProductI18nKeyAdded(this.getProductI18nKey())) { // Then throw exception - throw new FaceletException("Product i18n key " + this.getProductI18nKey() + " already added."); + throw new FacesException(MessageFormat.format("Product i18n key {0} already added.", this.getProductI18nKey())); } // Create current product instance @@ -191,7 +192,7 @@ public class FinancialAdminGenericProductActionWebViewBean extends BaseFinancial updatedProduct = this.adminProductBean.addGenericProduct(product); } catch (final ProductAlreadyAddedException ex) { // Continue to throw - throw new FaceletException(ex); + throw new FacesException(ex); } // Fire event @@ -549,7 +550,7 @@ public class FinancialAdminGenericProductActionWebViewBean extends BaseFinancial updatedProduct = this.adminProductBean.updateProductData(newProduct); } catch (final ProductNotFoundException ex) { // Throw again - throw new FaceletException(ex); + throw new FacesException(ex); } // Fire event 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 b5166e37..ec0721c4 100644 --- a/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/product_category/FinancialAdminCategoryWebRequestBean.java @@ -20,6 +20,7 @@ import javax.ejb.EJB; import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Event; import javax.enterprise.inject.Any; +import javax.faces.FacesException; import javax.faces.view.facelets.FaceletException; import javax.inject.Inject; import javax.inject.Named; @@ -97,7 +98,7 @@ public class FinancialAdminCategoryWebRequestBean extends BaseFinancialsBean imp // Is i18n key already used? if (this.categoryListController.isCategoryI18nKeyAdded(this.getCategoryI18nKey())) { // Throw exception - throw new FaceletException("Category i18n key " + this.getCategoryI18nKey() + " is already used."); + throw new FacesException("Category i18n key " + this.getCategoryI18nKey() + " is already used."); } // Create category @@ -111,7 +112,7 @@ public class FinancialAdminCategoryWebRequestBean extends BaseFinancialsBean imp updatedCategory = this.categoryBean.addProductCategory(category); } catch (final CategoryAlreadyAddedException ex) { // Continue to throw - throw new FaceletException(ex); + throw new FacesException(ex); } // Fire event