]> git.mxchange.org Git - addressbook-war.git/commitdiff
introduced method showFacesMessage() with 2nd parameter being a message string (pleas...
authorRoland Häder <roland@mxchange.org>
Thu, 21 Jul 2016 16:04:04 +0000 (18:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 21:38:34 +0000 (23:38 +0200)
src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java

index a17461f15c6c7d206621655305c9164c39d9c7e4..365e8072692371e95e4daf95ffef179903c3e716 100644 (file)
@@ -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.
+        * <p>
+        * @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));
        }
 
 }