You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2010/01/26 14:33:35 UTC

svn commit: r903221 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java

Author: matzew
Date: Tue Jan 26 13:33:35 2010
New Revision: 903221

URL: http://svn.apache.org/viewvc?rev=903221&view=rev
Log:
MYFACES-2480

second part: now the ClientBehaviorRenderer works as well. Only when the TARGET is present the annotation is not working (yet)

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=903221&r1=903220&r2=903221&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Tue Jan 26 13:33:35 2010
@@ -58,6 +58,7 @@
 import javax.faces.component.UIOutput;
 import javax.faces.component.UIViewRoot;
 import javax.faces.component.behavior.Behavior;
+import javax.faces.component.behavior.ClientBehaviorBase;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.DateTimeConverter;
@@ -74,6 +75,7 @@
 import javax.faces.event.SystemEvent;
 import javax.faces.event.SystemEventListener;
 import javax.faces.event.SystemEventListenerHolder;
+import javax.faces.render.ClientBehaviorRenderer;
 import javax.faces.render.Renderer;
 import javax.faces.validator.Validator;
 import javax.faces.view.ViewDeclarationLanguage;
@@ -998,6 +1000,18 @@
 
             _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), behavior);
 
+            if (behavior instanceof ClientBehaviorBase)
+            {
+              ClientBehaviorBase clientBehavior = (ClientBehaviorBase) behavior;
+              String renderType = clientBehavior.getRendererType();
+              if (renderType != null)
+              {
+                FacesContext ctx = FacesContext.getCurrentInstance();
+                ClientBehaviorRenderer cbr = ctx.getRenderKit().getClientBehaviorRenderer(renderType);
+                _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), cbr);
+              }
+            }
+
             return behavior;
         }
         catch (Exception e)