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/10/09 18:52:10 UTC

svn commit: r1006185 - /myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java

Author: lu4242
Date: Sat Oct  9 16:52:09 2010
New Revision: 1006185

URL: http://svn.apache.org/viewvc?rev=1006185&view=rev
Log:
MYFACES-2939 f:event type=postValidate does not work

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java?rev=1006185&r1=1006184&r2=1006185&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java Sat Oct  9 16:52:09 2010
@@ -22,6 +22,8 @@ import java.util.Iterator;
 
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.faces.event.PostValidateEvent;
+import javax.faces.event.PreValidateEvent;
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
@@ -132,6 +134,10 @@ public class UIForm extends UIComponentB
                 }
                 if (!isSubmitted())
                     return;
+
+                //Pre validation event dispatch for component
+                context.getApplication().publishEvent(context,  PreValidateEvent.class, UIComponent.class, this);
+                
                 for (Iterator<UIComponent> it = getFacetsAndChildren(); it.hasNext();)
                 {
                     it.next().processValidators(context);
@@ -139,6 +145,7 @@ public class UIForm extends UIComponentB
             }
             finally
             {
+                context.getApplication().publishEvent(context,  PostValidateEvent.class, UIComponent.class, this);
                 popComponentFromEL(context);
             }
         }