]> git.mxchange.org Git - pizzaservice-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 20:14:01 +0000 (22:14 +0200)
src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java

index ed2473387ebfa9b74e555af950e182275a4230f6..88e5c23e3db62e446c2738225f651e6524f1aac5 100644 (file)
@@ -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.
+        * <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));
        }
 
 }