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

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


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

Added:
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContextProducer.java
Removed:
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContext.java
Log:
renamed FacesContext to FacesContextProducer

Deleted: modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContext.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContext.java	2009-04-24 23:27:35 UTC (rev 10636)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContext.java	2009-04-24 23:28:28 UTC (rev 10637)
@@ -1,29 +0,0 @@
-//$Id: FacesContext.java 5350 2007-06-20 17:53:19Z gavin $
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Support for injecting the JSF FacesContext object
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.faces.facesContext")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class FacesContext
-{
-   @Unwrap
-   public javax.faces.context.FacesContext getContext()
-   {
-      return javax.faces.context.FacesContext.getCurrentInstance();
-   }
-}

Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContextProducer.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContextProducer.java	                        (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesContextProducer.java	2009-04-24 23:28:28 UTC (rev 10637)
@@ -0,0 +1,21 @@
+//$Id: FacesContext.java 5350 2007-06-20 17:53:19Z gavin $
+package org.jboss.seam.faces;
+
+import javax.annotation.Named;
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+import javax.faces.context.FacesContext;
+
+/**
+ * Support for injecting the JSF FacesContext object
+ * 
+ * @author Gavin King
+ */
+ at ApplicationScoped
+public class FacesContextProducer
+{
+   @Produces @Named public FacesContext getContext()
+   {
+      return FacesContext.getCurrentInstance();
+   }
+}




More information about the seam-commits mailing list