[richfaces-svn-commits] JBoss Rich Faces SVN: r18711 - trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Aug 17 11:01:52 EDT 2010


Author: nbelaevski
Date: 2010-08-17 11:01:52 -0400 (Tue, 17 Aug 2010)
New Revision: 18711

Modified:
   trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java
Log:
https://jira.jboss.org/browse/RF-8945

Modified: trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java	2010-08-17 14:57:20 UTC (rev 18710)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java	2010-08-17 15:01:52 UTC (rev 18711)
@@ -58,7 +58,19 @@
 
         // TagHandlers structure is created when view is compiled
         // so there's no need to check for BehaviorsStack
-        return factory.createComponentHandlerDelegate(new BehaviorsAddingComponentHandlerWrapper(owner));
+        
+        ComponentHandler wrappedHandler = owner;
+
+        //TODO - consider re-wrapping by smb. other, use attributes to handle
+        if (wrappedHandler instanceof BehaviorsAddingComponentHandlerWrapper) {
+            //MyFaces calls delegate factory just in ComponentHandler class ctor, so this is to avoid infinite recursion
+            //our delegate is fine with null value
+            return null;
+        } else {
+            wrappedHandler = new BehaviorsAddingComponentHandlerWrapper(owner);
+        }
+        
+        return factory.createComponentHandlerDelegate(wrappedHandler);
     }
 
     /*



More information about the richfaces-svn-commits mailing list