From f39265c4a3d94d6d54e51bece64ef4a99d813e76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Jul 2016 18:04:04 +0200 Subject: [PATCH] introduced method showFacesMessage() with 2nd parameter being a message string (please cherry-pick this) --- .../pizzaapplication/beans/BasePizzaController.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java index ed247338..88e5c23e 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java @@ -113,7 +113,18 @@ public abstract class BasePizzaController implements Serializable { System.out.println(MessageFormat.format("showFacesMessage: clientId={0},cause={1} - CALLED!", clientId, cause)); // Get context and add message - FacesContext.getCurrentInstance().addMessage(clientId, new FacesMessage(cause.getMessage())); + this.showFacesMessage(clientId, cause.getMessage()); + } + + /** + * Shows a faces message with given message. + *

+ * @param clientId Client id to send message to + * @param message Causing exception + */ + protected void showFacesMessage (final String clientId, final String message) { + // Get context and add message + FacesContext.getCurrentInstance().addMessage(clientId, new FacesMessage(message)); } } -- 2.39.5