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

svn commit: r904332 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java

Author: lu4242
Date: Fri Jan 29 01:12:38 2010
New Revision: 904332

URL: http://svn.apache.org/viewvc?rev=904332&view=rev
Log:
MYFACES-2519 f:event could be registered twice if it is child of UIViewRoot

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java?rev=904332&r1=904331&r2=904332&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/EventHandler.java Fri Jan 29 01:12:38 2010
@@ -29,6 +29,7 @@
 import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.event.ComponentSystemEvent;
 import javax.faces.event.ComponentSystemEventListener;
@@ -44,6 +45,7 @@
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletAttribute;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
 import org.apache.myfaces.config.NamedEventManager;
+import org.apache.myfaces.view.facelets.AbstractFaceletContext;
 import org.apache.myfaces.view.facelets.util.ReflectionUtil;
 
 /**
@@ -94,6 +96,11 @@
         {
             return;
         }
+        if (parent instanceof UIViewRoot && ((AbstractFaceletContext)ctx).isRefreshingTransientBuild())
+        {
+            return;
+        }
+        
         Class<? extends ComponentSystemEvent> eventClass = getEventClass (ctx);
         MethodExpression methodExp = listener.getMethodExpression(ctx, void.class, new Class<?>[] {
             ComponentSystemEvent.class });