[seam-commits] Seam SVN: r8247 - in trunk/src/main/org/jboss/seam: framework and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed May 21 06:39:01 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-05-21 06:39:00 -0400 (Wed, 21 May 2008)
New Revision: 8247

Modified:
   trunk/src/main/org/jboss/seam/faces/Navigator.java
   trunk/src/main/org/jboss/seam/framework/Controller.java
   trunk/src/main/org/jboss/seam/framework/Home.java
   trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
   trunk/src/main/org/jboss/seam/pageflow/Pageflow.java
   trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
Log:
Updates related to statusMessages

Modified: trunk/src/main/org/jboss/seam/faces/Navigator.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/Navigator.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/faces/Navigator.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -82,6 +82,7 @@
       }
    }
    
+   @SuppressWarnings("deprecation")
    protected static void addFacesMessage(String message, Severity severity, String control, Object... params)
    {
       if ( Contexts.isConversationContextActive() )

Modified: trunk/src/main/org/jboss/seam/framework/Controller.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Controller.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/framework/Controller.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -22,6 +22,7 @@
 import org.jboss.seam.faces.Renderer;
 import org.jboss.seam.faces.Validation;
 import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
 import org.jboss.seam.log.Log;
 import org.jboss.seam.security.Identity;
 import org.jboss.seam.transaction.Transaction;
@@ -71,11 +72,17 @@
       return Conversation.instance();
    }
 
+   @Deprecated
    protected FacesMessages getFacesMessages()
    {
       return FacesMessages.instance();
    }
    
+   protected StatusMessages getStatusMessages()
+   {
+      return StatusMessages.instance();
+   }
+   
    protected Identity getIdentity()
    {
       return Identity.instance();

Modified: trunk/src/main/org/jboss/seam/framework/Home.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Home.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/framework/Home.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -1,6 +1,6 @@
 package org.jboss.seam.framework;
 
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
 
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -51,7 +51,7 @@
    protected void updatedMessage()
    {
       debug("updated entity #0 #1", getEntityClass().getName(), getId());
-      getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getUpdatedMessageKey(), getUpdatedMessage() );
+      getStatusMessages().addFromResourceBundleOrDefault( INFO, getUpdatedMessageKey(), getUpdatedMessage() );
    }
 
    /**
@@ -69,7 +69,7 @@
    protected void deletedMessage()
    {
       debug("deleted entity #0 #1", getEntityClass().getName(), getId());
-      getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getDeletedMessageKey(), getDeletedMessage() );
+      getStatusMessages().addFromResourceBundleOrDefault( INFO, getDeletedMessageKey(), getDeletedMessage() );
    }
    
    /**
@@ -87,7 +87,7 @@
    protected void createdMessage()
    {
       debug("created entity #0 #1", getEntityClass().getName(), getId());
-      getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getCreatedMessageKey(), getCreatedMessage() );
+      getStatusMessages().addFromResourceBundleOrDefault( INFO, getCreatedMessageKey(), getCreatedMessage() );
    }
 
    /**

Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -15,7 +15,6 @@
 import java.lang.reflect.Method;
 import java.util.Map;
 
-import javax.faces.application.FacesMessage;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseEvent;
@@ -37,6 +36,7 @@
 import org.jboss.seam.faces.FacesPage;
 import org.jboss.seam.faces.Switcher;
 import org.jboss.seam.faces.Validation;
+import org.jboss.seam.international.StatusMessage;
 import org.jboss.seam.log.LogProvider;
 import org.jboss.seam.log.Logging;
 import org.jboss.seam.navigation.Pages;
@@ -445,7 +445,7 @@
          if ( Transaction.instance().isRolledBackOrMarkedRollback() )
          {
             FacesMessages.instance().addFromResourceBundleOrDefault(
-                     FacesMessage.SEVERITY_WARN, 
+                     StatusMessage.Severity.WARN, 
                      "org.jboss.seam.TransactionFailed", 
                      "Transaction failed"
                   );

Modified: trunk/src/main/org/jboss/seam/pageflow/Pageflow.java
===================================================================
--- trunk/src/main/org/jboss/seam/pageflow/Pageflow.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/pageflow/Pageflow.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -5,7 +5,6 @@
 import java.io.Serializable;
 import java.util.List;
 
-import javax.faces.application.FacesMessage;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
@@ -23,8 +22,9 @@
 import org.jboss.seam.core.AbstractMutable;
 import org.jboss.seam.core.Events;
 import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.FacesMessages;
 import org.jboss.seam.faces.FacesPage;
+import org.jboss.seam.international.StatusMessage;
+import org.jboss.seam.international.StatusMessages;
 import org.jboss.seam.log.LogProvider;
 import org.jboss.seam.log.Logging;
 import org.jboss.seam.navigation.Pages;
@@ -158,8 +158,8 @@
     */
    protected void illegalNavigation()
    {
-      FacesMessages.instance().addFromResourceBundleOrDefault( 
-            FacesMessage.SEVERITY_WARN, 
+      StatusMessages.instance().addFromResourceBundleOrDefault( 
+            StatusMessage.Severity.WARN, 
             "org.jboss.seam.IllegalNavigation", 
             "Illegal navigation" 
          );

Modified: trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/UserAction.java	2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/security/management/action/UserAction.java	2008-05-21 10:39:00 UTC (rev 8247)
@@ -11,7 +11,7 @@
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Scope;
 import org.jboss.seam.core.Conversation;
-import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.StatusMessages;
 import org.jboss.seam.security.management.IdentityManager;
 
 /**
@@ -67,7 +67,7 @@
    {      
       if (!password.equals(confirm))
       {
-         FacesMessages.instance().addToControl("password", "Passwords do not match");
+         StatusMessages.instance().addToControl("password", "Passwords do not match");
          return "failure";
       }
       
@@ -100,7 +100,7 @@
       {
          if (!password.equals(confirm))
          {
-            FacesMessages.instance().addToControl("password", "Passwords do not match");
+            StatusMessages.instance().addToControl("password", "Passwords do not match");
             return "failure";
          }
          else




More information about the seam-commits mailing list