[seam-commits] Seam SVN: r10635 - modules/trunk/international/src/main/java/org/jboss/seam/international.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Apr 24 19:27:13 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-04-24 19:27:12 -0400 (Fri, 24 Apr 2009)
New Revision: 10635

Removed:
   modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java
Modified:
   modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/TimeZoneSelector.java
Log:
more porting of international module

Deleted: modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java	2009-04-24 23:26:14 UTC (rev 10634)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java	2009-04-24 23:27:12 UTC (rev 10635)
@@ -1,21 +0,0 @@
-package org.jboss.seam.international;
-
-import javax.annotation.Named;
-import javax.inject.Produces;
-
-/**
- * Manager component for the current locale that is
- * aware of the selected locale
- * 
- * @author Gavin King
- */
-public class Locale
-{
-   @Produces public java.util.Locale getLocale()
-   {
-      return Contexts.isSessionContextActive() ?
-            LocaleSelector.instance().getLocale() :
-            super.getLocale();
-   }
-   
-}
\ No newline at end of file

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java	2009-04-24 23:26:14 UTC (rev 10634)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java	2009-04-24 23:27:12 UTC (rev 10635)
@@ -13,6 +13,7 @@
 import javax.faces.model.SelectItem;
 import javax.inject.Current;
 import javax.inject.Initializer;
+import javax.inject.Produces;
 import javax.inject.manager.Manager;
 import javax.servlet.ServletRequest;
 
@@ -140,7 +141,7 @@
    /**
     * Get the selected locale
     */
-   public Locale getLocale() 
+   @Produces public Locale getLocale() 
    {
       FacesContext facesContext = FacesContext.getCurrentInstance();
       if (facesContext!=null)

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java	2009-04-24 23:26:14 UTC (rev 10634)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java	2009-04-24 23:27:12 UTC (rev 10635)
@@ -10,9 +10,6 @@
 import java.util.Map;
 
 import org.hibernate.validator.InvalidValue;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Contexts;
 import org.jboss.seam.international.StatusMessage.Severity;
 
 /**
@@ -369,18 +366,6 @@
       return tasks;
    }
    
-   protected static void runTasks()
-   {
-      if ( Contexts.isConversationContextActive() )
-      {
-         StatusMessages statusMessages = instance();
-         if (statusMessages != null)
-         {
-            statusMessages.doRunTasks();
-         }
-      }
-   }
-   
    protected void doRunTasks()
    {
       if (tasks!=null)
@@ -389,14 +374,5 @@
          tasks.clear();
       }
    }
-   
-   public static StatusMessages instance()
-   {
-      if ( !Contexts.isConversationContextActive() )
-      {
-         throw new IllegalStateException("No active conversation context");
-      }
-      return (StatusMessages) Component.getInstance(COMPONENT_NAME, ScopeType.CONVERSATION);
-   }
 
 }

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/TimeZoneSelector.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/TimeZoneSelector.java	2009-04-24 23:26:14 UTC (rev 10634)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/TimeZoneSelector.java	2009-04-24 23:27:12 UTC (rev 10635)
@@ -89,14 +89,5 @@
          return java.util.TimeZone.getTimeZone( getTimeZoneId() );
       }
    }
-
-   public static TimeZoneSelector instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (TimeZoneSelector) Component.getInstance(TimeZoneSelector.class, ScopeType.SESSION);
-   }
    
 }




More information about the seam-commits mailing list