[seam-commits] Seam SVN: r10572 - in modules/trunk: international/src/main/java/org/jboss/seam/international and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Apr 22 01:28:41 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-04-22 01:28:41 -0400 (Wed, 22 Apr 2009)
New Revision: 10572

Added:
   modules/trunk/international/src/main/java/org/jboss/seam/international/events/
   modules/trunk/international/src/main/java/org/jboss/seam/international/events/LocaleSelectedEvent.java
Modified:
   modules/trunk/international/pom.xml
   modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java
   modules/trunk/security/pom.xml
   modules/trunk/version-matrix/pom.xml
Log:
update dependencies

Modified: modules/trunk/international/pom.xml
===================================================================
--- modules/trunk/international/pom.xml	2009-04-22 05:24:21 UTC (rev 10571)
+++ modules/trunk/international/pom.xml	2009-04-22 05:28:41 UTC (rev 10572)
@@ -23,6 +23,18 @@
          <groupId>org.jboss.webbeans</groupId>
          <artifactId>webbeans-logging</artifactId>
       </dependency> 
+      <dependency>
+         <groupId>javax.faces</groupId>
+         <artifactId>jsf-api</artifactId>      
+      </dependency>
+      <dependency>
+         <groupId>javax.servlet</groupId>
+         <artifactId>servlet-api</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>seam-common</artifactId>
+      </dependency>
    </dependencies>
   
 </project>

Modified: 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-22 05:24:21 UTC (rev 10571)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/Locale.java	2009-04-22 05:28:41 UTC (rev 10572)
@@ -9,7 +9,7 @@
  * 
  * @author Gavin King
  */
-public class Locale extends org.jboss.seam.core.Locale
+public class Locale
 {
    @Produces public java.util.Locale getLocale()
    {

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-22 05:24:21 UTC (rev 10571)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleSelector.java	2009-04-22 05:28:41 UTC (rev 10572)
@@ -1,28 +1,24 @@
 package org.jboss.seam.international;
 
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
+import javax.annotation.Named;
+import javax.context.SessionScoped;
 import javax.faces.context.FacesContext;
 import javax.faces.event.ValueChangeEvent;
 import javax.faces.model.SelectItem;
+import javax.inject.Current;
+import javax.inject.Initializer;
+import javax.inject.manager.Manager;
 import javax.servlet.ServletRequest;
 
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
 import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
 import org.jboss.seam.faces.Selector;
+import org.jboss.seam.international.events.LocaleSelectedEvent;
 import org.jboss.seam.util.Strings;
 import org.jboss.seam.web.ServletContexts;
 
@@ -31,19 +27,19 @@
  * 
  * @author Gavin King
  */
- at Scope(ScopeType.SESSION)
- at Name("org.jboss.seam.international.localeSelector")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
+ at Named
+ at SessionScoped
 public class LocaleSelector extends Selector
 {
    private static final long serialVersionUID = -6087667065688208261L;
    
+   @Current Manager manager;
+   
    private String language;
    private String country;
    private String variant;
    
-   @Create
+   @Initializer
    public void initLocale()
    {
       String localeString = getCookieValueIfEnabled();
@@ -68,10 +64,7 @@
       
       setCookieValueIfEnabled( getLocaleString() );
 
-      if ( Events.exists() ) 
-      {
-          Events.instance().raiseEvent( "org.jboss.seam.localeSelected", getLocaleString() );
-      }
+      manager.fireEvent(new LocaleSelectedEvent(getLocaleString()));
    }
    
    public void select(ValueChangeEvent event) 

Added: modules/trunk/international/src/main/java/org/jboss/seam/international/events/LocaleSelectedEvent.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/events/LocaleSelectedEvent.java	                        (rev 0)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/events/LocaleSelectedEvent.java	2009-04-22 05:28:41 UTC (rev 10572)
@@ -0,0 +1,21 @@
+package org.jboss.seam.international.events;
+
+/**
+ * This event is raised when a locale is selected
+ *  
+ * @author Shane Bryzak
+ */
+public class LocaleSelectedEvent
+{
+   private String locale;
+   
+   public LocaleSelectedEvent(String locale)
+   {
+      this.locale = locale;
+   }
+   
+   public String getLocale()
+   {
+      return locale;
+   }
+}

Modified: modules/trunk/security/pom.xml
===================================================================
--- modules/trunk/security/pom.xml	2009-04-22 05:24:21 UTC (rev 10571)
+++ modules/trunk/security/pom.xml	2009-04-22 05:28:41 UTC (rev 10572)
@@ -28,16 +28,5 @@
          <artifactId>persistence-api</artifactId>
       </dependency>   
    </dependencies>
-   
-   <build>
-      <plugins>  
-         <plugin>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-               <source>1.5</source>
-               <target>1.5</target>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>   
+
 </project>

Modified: modules/trunk/version-matrix/pom.xml
===================================================================
--- modules/trunk/version-matrix/pom.xml	2009-04-22 05:24:21 UTC (rev 10571)
+++ modules/trunk/version-matrix/pom.xml	2009-04-22 05:28:41 UTC (rev 10572)
@@ -159,6 +159,12 @@
             <version>1.0.0-SNAPSHOT</version>                           
          </dependency>
          
+         <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>seam-common</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+         </dependency>
+         
       </dependencies>
    </dependencyManagement>
 




More information about the seam-commits mailing list