myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r791055 - in /myfaces/core/branches/2_0_0/impl/src/main: conf/META-INF/standard-faces-config-base.xml java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java java/org/apache/myfaces/config/FacesConfigurator.java
Date Sat, 04 Jul 2009 03:23:24 GMT
Author: lu4242
Date: Sat Jul  4 03:23:22 2009
New Revision: 791055

URL: http://svn.apache.org/viewvc?rev=791055&view=rev
Log:
Make FacesConfigurator scan and register VisitContextFactoryImpl

Modified:
    myfaces/core/branches/2_0_0/impl/src/main/conf/META-INF/standard-faces-config-base.xml
    myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java
    myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Modified: myfaces/core/branches/2_0_0/impl/src/main/conf/META-INF/standard-faces-config-base.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/conf/META-INF/standard-faces-config-base.xml?rev=791055&r1=791054&r2=791055&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/conf/META-INF/standard-faces-config-base.xml
(original)
+++ myfaces/core/branches/2_0_0/impl/src/main/conf/META-INF/standard-faces-config-base.xml
Sat Jul  4 03:23:22 2009
@@ -52,6 +52,7 @@
       <partial-view-context-factory>org.apache.myfaces.context.PartialViewContextFactoryImpl</partial-view-context-factory>
       <lifecycle-factory>org.apache.myfaces.lifecycle.LifecycleFactoryImpl</lifecycle-factory>
       <render-kit-factory>org.apache.myfaces.renderkit.RenderKitFactoryImpl</render-kit-factory>
+      <visit-context-factory>org.apache.myfaces.component.visit.VisitContextFactoryImpl</visit-context-factory>
    </factory>
    
    <!-- standard converters by class -->

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java?rev=791055&r1=791054&r2=791055&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java
(original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/component/visit/VisitContextFactoryImpl.java
Sat Jul  4 03:23:22 2009
@@ -34,6 +34,10 @@
 
     VisitContextFactory _wrapped = null;
 
+    public VisitContextFactoryImpl()
+    {
+    }
+    
     public VisitContextFactoryImpl(VisitContextFactory wrapped) {
         _wrapped = wrapped;
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=791055&r1=791054&r2=791055&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
(original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Sat Jul  4 03:23:22 2009
@@ -71,6 +71,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.application.ApplicationFactoryImpl;
 import org.apache.myfaces.application.ApplicationImpl;
+import org.apache.myfaces.component.visit.VisitContextFactoryImpl;
 import org.apache.myfaces.config.annotation.AnnotationConfigurator;
 import org.apache.myfaces.config.element.ManagedBean;
 import org.apache.myfaces.config.element.NavigationRule;
@@ -124,6 +125,7 @@
     private static final String DEFAULT_LIFECYCLE_FACTORY = LifecycleFactoryImpl.class.getName();
     private static final String DEFAULT_RENDER_KIT_FACTORY = RenderKitFactoryImpl.class.getName();
     private static final String DEFAULT_PARTIAL_VIEW_CONTEXT_FACTORY = PartialViewContextFactoryImpl.class.getName();
+    private static final String DEFAULT_VISIT_CONTEXT_FACTORY = VisitContextFactoryImpl.class.getName();
     private static final String DEFAULT_FACES_CONFIG = "/WEB-INF/faces-config.xml";
 
     private static final Set<String> FACTORY_NAMES = new HashSet<String>();
@@ -133,6 +135,7 @@
         FACTORY_NAMES.add(FactoryFinder.LIFECYCLE_FACTORY);
         FACTORY_NAMES.add(FactoryFinder.RENDER_KIT_FACTORY);
         FACTORY_NAMES.add(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY);
+        FACTORY_NAMES.add(FactoryFinder.VISIT_CONTEXT_FACTORY);
     }
 
     private final ExternalContext _externalContext;
@@ -628,6 +631,9 @@
                     } else if (factoryName.equals(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY))
                     {
                         getDispenser().feedPartialViewContextFactory(className);
+                    } else if(factoryName.equals(FactoryFinder.VISIT_CONTEXT_FACTORY)) 
+                    {
+                        getDispenser().feedVisitContextFactory(className);
                     } else
                     {
                         throw new IllegalStateException("Unexpected factory name " + factoryName);
@@ -1494,6 +1500,8 @@
                      DEFAULT_RENDER_KIT_FACTORY);
         setFactories(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, dispenser.getPartialViewContextFactoryIterator(),
                      DEFAULT_PARTIAL_VIEW_CONTEXT_FACTORY);
+        setFactories(FactoryFinder.VISIT_CONTEXT_FACTORY, dispenser.getVisitContextFactoryIterator(),
+                     DEFAULT_VISIT_CONTEXT_FACTORY);
     }
 
     private void setFactories(String factoryName, Collection<String> factories, String
defaultFactory)



Mime
View raw message