myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r814255 - in /myfaces/core/trunk/impl/src/main: java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java resources/META-INF/faces-config20.vm
Date Sun, 13 Sep 2009 00:15:55 GMT
Author: lu4242
Date: Sun Sep 13 00:15:54 2009
New Revision: 814255

URL: http://svn.apache.org/viewvc?rev=814255&view=rev
Log:
MYFACES-2350 All renderers of components that implements ClientBehaviorHolder should encode
javascript attributes

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
    myfaces/core/trunk/impl/src/main/resources/META-INF/faces-config20.vm

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java?rev=814255&r1=814254&r2=814255&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
Sun Sep 13 00:15:54 2009
@@ -240,8 +240,8 @@
         digester.addCallMethod("faces-config/render-kit/renderer/renderer-class", "setRendererClass",
0);
         digester.addObjectCreate("faces-config/render-kit/client-behavior-renderer", ClientBehaviorRenderer.class);
         digester.addSetNext("faces-config/render-kit/client-behavior-renderer", "addClientBehaviorRenderer");
-        digester.addCallMethod("faces-config/render-kit/renderer/client-behavior-renderer-type",
"setRendererType", 0);
-        digester.addCallMethod("faces-config/render-kit/renderer/client-behavior-renderer-class",
"setRendererClass", 0);
+        digester.addCallMethod("faces-config/render-kit/client-behavior-renderer/client-behavior-renderer-type",
"setRendererType", 0);
+        digester.addCallMethod("faces-config/render-kit/client-behavior-renderer/client-behavior-renderer-class",
"setRendererClass", 0);
         
         // 2.0 behavior start
         digester.addObjectCreate("faces-config/behavior", Behavior.class);

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java?rev=814255&r1=814254&r2=814255&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
Sun Sep 13 00:15:54 2009
@@ -18,29 +18,30 @@
  */
 package org.apache.myfaces.renderkit.html;
 
-import javax.faces.context.FacesContext;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.AjaxBehavior;
 import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.component.behavior.ClientBehaviorContext;
-import javax.faces.component.behavior.AjaxBehavior;
-import javax.faces.event.PhaseId;
+import javax.faces.context.FacesContext;
 import javax.faces.event.AjaxBehaviorEvent;
-import javax.faces.FacesException;
-import javax.faces.render.FacesBehaviorRenderer;
-import java.util.Collection;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
+import javax.faces.event.PhaseId;
+import javax.faces.render.ClientBehaviorRenderer;
 
 /**
  * @author Werner Punz  (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-@FacesBehaviorRenderer(rendererType = "javax.faces.behavior.Ajax", renderKitId = "HTML_BASIC")
-public class HtmlAjaxBehaviorRenderer {
+public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
+{
 
     private static final String QUOTE = "'";
     private static final String BLANK = " ";

Modified: myfaces/core/trunk/impl/src/main/resources/META-INF/faces-config20.vm
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/resources/META-INF/faces-config20.vm?rev=814255&r1=814254&r2=814255&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/resources/META-INF/faces-config20.vm (original)
+++ myfaces/core/trunk/impl/src/main/resources/META-INF/faces-config20.vm Sun Sep 13 00:15:54
2009
@@ -112,6 +112,11 @@
 #if ($renderKit.className)
     <render-kit-class>$renderKit.className</render-kit-class>
 #end
+## TODO: Create a myfaces builder annotation and add through this class
+    <client-behavior-renderer>
+        <client-behavior-renderer-type>javax.faces.behavior.Ajax</client-behavior-renderer-type>
+        <client-behavior-renderer-class>org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer</client-behavior-renderer-class>
+    </client-behavior-renderer>
 #set ($rendererList = ${renderKit.getRenderers()})
 #foreach( $renderer in $rendererList )
       <renderer>



Mime
View raw message