myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r813629 - in /myfaces/core/trunk: api/src/main/java/javax/faces/component/UIComponentBase.java impl/src/main/conf/META-INF/standard-faces-config-base.xml
Date Thu, 10 Sep 2009 22:55:35 GMT
Author: lu4242
Date: Thu Sep 10 22:55:35 2009
New Revision: 813629

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

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
    myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=813629&r1=813628&r2=813629&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java Thu Sep
10 22:55:35 2009
@@ -32,10 +32,12 @@
 import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
+import javax.faces.component.behavior.Behavior;
 import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 import javax.faces.event.AbortProcessingException;
+import javax.faces.event.BehaviorEvent;
 import javax.faces.event.FacesEvent;
 import javax.faces.event.FacesListener;
 import javax.faces.event.PhaseId;
@@ -383,6 +385,14 @@
                     event.processListener(facesListener);
                 }
             }
+            if (event instanceof BehaviorEvent && event.getComponent() == this)
+            {
+                Behavior behavior = ((BehaviorEvent) event).getBehavior();
+                if (behavior instanceof ClientBehavior)
+                {
+                    behavior.broadcast((BehaviorEvent) event);
+                }
+            }
         }
         catch (Exception ex)
         {

Modified: myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml?rev=813629&r1=813628&r2=813629&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml (original)
+++ myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml Thu Sep
10 22:55:35 2009
@@ -63,6 +63,12 @@
       <exception-handler-factory>org.apache.myfaces.context.ExceptionHandlerFactoryImpl</exception-handler-factory>
    </factory>
    
+   <!-- behaviors by id -->
+   <behavior>
+      <behavior-id>javax.faces.behavior.Ajax</behavior-id>
+      <behavior-class>javax.faces.component.behavior.AjaxBehavior</behavior-class>
+   </behavior>
+   
    <!-- standard converters by class -->
    
    <converter>



Mime
View raw message