You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2011/09/17 12:36:49 UTC

svn commit: r1171943 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java

Author: bommel
Date: Sat Sep 17 10:36:49 2011
New Revision: 1171943

URL: http://svn.apache.org/viewvc?rev=1171943&view=rev
Log:
support TabChangeEvent for client side tabGroup

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java?rev=1171943&r1=1171942&r2=1171943&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java Sat Sep 17 10:36:49 2011
@@ -92,7 +92,8 @@ public abstract class AbstractUITabGroup
 
   public void queueEvent(FacesEvent event) {
     if (this == event.getSource()) {
-      if (isImmediate()) {
+      if (isImmediate() || isClientType()) {
+        // if switch type client event is always immediate
         event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
       } else {
         event.setPhaseId(PhaseId.INVOKE_APPLICATION);
@@ -199,10 +200,11 @@ public abstract class AbstractUITabGroup
       FacesUtils.invokeMethodBinding(getFacesContext(), getTabChangeListener(), facesEvent);
 
       FacesUtils.invokeMethodBinding(getFacesContext(), getActionListener(), facesEvent);
-
-      ActionListener defaultActionListener = getFacesContext().getApplication().getActionListener();
-      if (defaultActionListener != null) {
-        defaultActionListener.processAction((ActionEvent) facesEvent);
+      if (!isClientType()) {
+        ActionListener defaultActionListener = getFacesContext().getApplication().getActionListener();
+        if (defaultActionListener != null) {
+          defaultActionListener.processAction((ActionEvent) facesEvent);
+        }
       }
       Integer index = ((TabChangeEvent) facesEvent).getNewTabIndex();
       if (FacesUtils.hasValueBindingOrValueExpression(this, Attributes.SELECTED_INDEX)) {