[seam-commits] Seam SVN: r11048 - in modules/trunk: faces/src/main/java/org/jboss/seam/faces/context and 6 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri May 29 14:51:54 EDT 2009


Author: dan.j.allen
Date: 2009-05-29 14:51:54 -0400 (Fri, 29 May 2009)
New Revision: 11048

Modified:
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
   modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
   modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
   modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
   modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java
Log:
have FacesContextProducer produce FacesContext into request-scope
that fixes problems with injecting it
clean up FIXME comments


Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -12,7 +12,7 @@
 import javax.faces.application.ApplicationFactory;
 
 /**
- * FIXME update docs
+ * FIXME update javadoc - was copied from old rev of class
  * Configures the JSF locale support from the Seam container.
  * 
  * <p>

Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -6,11 +6,15 @@
 import javax.faces.context.FacesContext;
 
 /**
- * Support for injecting the JSF FacesContext object
+ * <p>A producer which retrieves the current JSF FacesContext by calling
+ * {@link FacesContext#getCurrentInstance}, thus allowing it to be
+ * injected.</p>
  * 
- * QUESTION should we return null if there is no current phase id? (seems to be a common check)
+ * <p>QUESTION should we return null if there is no current phase id? (seems to be a common check)</p>
+ * <p>QUESTION is it correct to use a @RequestScoped producer? If it is @Dependent, then a developer could unknowingly bind it to a wider-scoped bean</p>
  * 
  * @author Gavin King
+ * @author Dan Allen
  */
 public class FacesContextProducer
 {

Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -23,8 +23,6 @@
    
    public boolean isActive()
    {
-      // FIXME temporary hack since a bogus FacesContext is being injected
-      facesContext = FacesContext.getCurrentInstance();
       return facesContext != null && facesContext.getCurrentPhaseId() != null;
    }
 

Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -25,8 +25,6 @@
    
    public boolean isActive()
    {
-      // FIXME temporary hack since the FacesContext being injected is bogus
-      facesContext = FacesContext.getCurrentInstance();
       return facesContext != null && facesContext.getCurrentPhaseId() != null;
    }
    

Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -31,8 +31,6 @@
    
    public boolean isActive()
    {
-      // FIXME temporary hack since facesContext is not injecting correctly into this class
-      facesContext = FacesContext.getCurrentInstance();
       return facesContext != null && facesContext.getCurrentPhaseId() != null && facesContext.getExternalContext() != null;
    }
 

Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -45,7 +45,7 @@
    private void installWebBeansELResolver()
    {
       Expressions expressions = getCurrentManager().getInstanceByType(Expressions.class);
-      // FIXME wow this is a hack
+      // FIXME wow this is a hack to add a new ELResolver
       ((CompositeELResolver) expressions.getELContext().getELResolver()).add(new WebBeansELResolver());
       elResolverInitialized = true;
    }

Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -104,7 +104,7 @@
       Map<Object, Object> fixture = new HashMap<Object, Object>();
       fixture.put("name", "Dan");
       Expressions expressions = getCurrentManager().getInstanceByType(Expressions.class);
-      // FIXME wow this is a hack
+      // FIXME wow this is a hack to add a new EL resolver
       ((CompositeELResolver) expressions.getELContext().getELResolver()).add(new TestFixtureELResolver(fixture));
       elResolverInitialized = true;
    }

Modified: modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
===================================================================
--- modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -15,7 +15,7 @@
 {
    public BeanManager getCurrentManager()
    {
-      // FIXME: waiting on upgrade
+      // FIXME waiting on upgrade
       return (BeanManager) ActivityManager.getInstance().getCurrentActivity();
    }
 }

Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java	2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java	2009-05-29 18:51:54 UTC (rev 11048)
@@ -3,7 +3,7 @@
 import javax.enterprise.context.ApplicationScoped;
 
 /**
- * FIXME - a hack until we get some proper bean configuration
+ * FIXME a hack until we get some proper bean configuration
  * 
  * @author Shane Bryzak
  *




More information about the seam-commits mailing list