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 2009/09/29 00:33:59 UTC

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

Author: lu4242
Date: Mon Sep 28 22:33:58 2009
New Revision: 819756

URL: http://svn.apache.org/viewvc?rev=819756&view=rev
Log:
MYFACES-2361 Add missing component system event dispatches (PreValidateEvent and PostValidateEvent)

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

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java?rev=819756&r1=819755&r2=819756&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java Mon Sep 28 22:33:58 2009
@@ -146,6 +146,9 @@
         {
             try
             {
+                //Pre validation event dispatch for component
+                context.getApplication().publishEvent(context,  PreValidateEvent.class, UIComponent.class, this);
+
                 validate(context);
             }
             catch (RuntimeException e)
@@ -153,6 +156,10 @@
                 context.renderResponse();
                 throw e;
             }
+            finally
+            {
+                context.getApplication().publishEvent(context,  PostValidateEvent.class, UIComponent.class, this);
+            }
             if (!isValid())
             {
                 context.renderResponse();
@@ -178,6 +185,9 @@
         {
             try
             {
+                //Pre validation event dispatch for component
+                context.getApplication().publishEvent(context,  PreValidateEvent.class, UIComponent.class, this);
+
                 validate(context);
             }
             catch (RuntimeException e)
@@ -185,6 +195,10 @@
                 context.renderResponse();
                 throw e;
             }
+            finally
+            {
+                context.getApplication().publishEvent(context,  PostValidateEvent.class, UIComponent.class, this);
+            }
             if (!isValid())
             {
                 context.renderResponse();
@@ -468,9 +482,6 @@
 
         try
         {
-            //Pre validation event dispatch for component
-            context.getApplication().publishEvent(context,  PreValidateEvent.class, UIComponent.class, this);
-
             Object submittedValue = getSubmittedValue();
             if (submittedValue == null)
             {
@@ -512,7 +523,6 @@
             throw new FacesException("Exception while validating component with path : "
                     + _ComponentUtils.getPathToComponent(this), ex);
         }
-
     }
 
     /**