From: Roland Häder Date: Thu, 21 Jul 2016 16:04:04 +0000 (+0200) Subject: introduced method showFacesMessage() with 2nd parameter being a message string (pleas... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7c346679fca1520e9486b700e7f9b1fe63bd6d0;p=jfinancials-war.git introduced method showFacesMessage() with 2nd parameter being a message string (please cherry-pick this) --- diff --git a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java index a17461f1..365e8072 100644 --- a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java +++ b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java @@ -113,7 +113,18 @@ public abstract class BaseAddressbookController 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)); } }