You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/08/10 16:50:00 UTC

svn commit: r1755782 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Author: lofwyr
Date: Wed Aug 10 16:50:00 2016
New Revision: 1755782

URL: http://svn.apache.org/viewvc?rev=1755782&view=rev
Log:
TOBAGO-1574: AJAX not working from change-facet-command
* hack to make after and before facets runable with AJAX buttons

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java?rev=1755782&r1=1755781&r2=1755782&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java Wed Aug 10 16:50:00 2016
@@ -19,6 +19,7 @@
 
 package org.apache.myfaces.tobago.renderkit.util;
 
+import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
@@ -269,6 +270,12 @@ public final class RenderUtils {
       // search for clientBehaviorHolder in facets
       behaviors = new HashMap<String, List<ClientBehavior>>();
       for (Map.Entry<String, UIComponent> facetEntry : ((UIComponent) holder).getFacets().entrySet()) {
+
+        // XXX hack to make after and before facets runable with AJAX buttons
+        if (facetEntry.getKey().equals(Facets.before.name()) || facetEntry.getKey().equals(Facets.after.name())) {
+          break;
+        }
+
         if (facetEntry.getValue() instanceof ClientBehaviorHolder) {
           final ClientBehaviorHolder behaviorHolder = (ClientBehaviorHolder) facetEntry.getValue();
           final Map<String, List<ClientBehavior>> behaviorsMap = behaviorHolder.getClientBehaviors();