You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2008/10/02 01:39:25 UTC

svn commit: r700971 - in /myfaces/core/branches/2_0_0/impl: pom.xml src/main/java/org/apache/myfaces/application/ApplicationImpl.java

Author: slessard
Date: Wed Oct  1 16:39:25 2008
New Revision: 700971

URL: http://svn.apache.org/viewvc?rev=700971&view=rev
Log:
MYFACES-1985 - In ApplicationImpl, implements 

public void publishEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)

Modified:
    myfaces/core/branches/2_0_0/impl/pom.xml
    myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java

Modified: myfaces/core/branches/2_0_0/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/pom.xml?rev=700971&r1=700970&r2=700971&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/pom.xml (original)
+++ myfaces/core/branches/2_0_0/impl/pom.xml Wed Oct  1 16:39:25 2008
@@ -554,6 +554,6 @@
   </repositories>
 
   <properties>
-    <myfaces-shared.version>3.0.4-SNAPSHOT</myfaces-shared.version>
+    <myfaces-shared.version>3.0.5-SNAPSHOT</myfaces-shared.version>
   </properties>
 </project>

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=700971&r1=700970&r2=700971&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Wed Oct  1 16:39:25 2008
@@ -392,12 +392,6 @@
     @Override
     public void publishEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
     {
-        // TODO: JSF 2.0 #44
-    }
-    
-    @Override
-    public void publishEvent(Class<? extends SystemEvent> systemEventClass, Object source)
-    {
         checkNull(systemEventClass, "systemEventClass");
         checkNull(source, "source");
         
@@ -412,8 +406,14 @@
         SystemListenerEntry systemListenerEntry  = _systemEventListenerClassMap.get(systemEventClass);
         if (systemListenerEntry != null)
         {
-            systemListenerEntry.publish(systemEventClass, source, event);
-        }     
+            systemListenerEntry.publish(systemEventClass, sourceBaseType, source, event);
+        }  
+    }
+    
+    @Override
+    public void publishEvent(Class<? extends SystemEvent> systemEventClass, Object source)
+    {
+        publishEvent(systemEventClass, source.getClass(), source);  
     }
 
     @Override
@@ -1349,12 +1349,12 @@
                 }
             }
         }
-
-        public void publish(Class<? extends SystemEvent> systemEventClass, Object source, SystemEvent event)
+        
+        public void publish(Class<? extends SystemEvent> systemEventClass, Class<?> classSource, Object source, SystemEvent event)
         {
             if (source != null && _sourceClassMap != null)
             {
-                event = _traverseListenerList(_sourceClassMap.get(source.getClass()), systemEventClass, source, event);
+                event = _traverseListenerList(_sourceClassMap.get(classSource), systemEventClass, source, event);
             }
 
             _traverseListenerList(_lstSystemEventListener, systemEventClass, source, event);