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 2011/08/02 05:24:37 UTC

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

Author: lu4242
Date: Tue Aug  2 03:24:37 2011
New Revision: 1153012

URL: http://svn.apache.org/viewvc?rev=1153012&view=rev
Log:
MYFACES-3255 UICommand.queueEvent description changed since 2.0

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

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java?rev=1153012&r1=1153011&r2=1153012&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java Tue Aug  2 03:24:37 2011
@@ -127,13 +127,17 @@ public class UICommand extends UICompone
     {
         if (event != null && event instanceof ActionEvent)
         {
-            if (isImmediate())
+            UIComponent component = event.getComponent();
+            if (component instanceof ActionSource)
             {
-                event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
-            }
-            else
-            {
-                event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+                if (((ActionSource)component).isImmediate())
+                {
+                    event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+                }
+                else
+                {
+                    event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+                }
             }
         }
         super.queueEvent(event);