myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bara...@apache.org
Subject svn commit: r347964 - /myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java
Date Mon, 21 Nov 2005 19:44:15 GMT
Author: baranda
Date: Mon Nov 21 11:44:02 2005
New Revision: 347964

URL: http://svn.apache.org/viewcvs?rev=347964&view=rev
Log:
Fixes MYFACES-848. Thanks to Paul Klaer

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java?rev=347964&r1=347963&r2=347964&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java
(original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/jslistener/JsValueChangeListenerRenderer.java
Mon Nov 21 11:44:02 2005
@@ -110,16 +110,11 @@
         {
             String oldValueStr = oldValue.toString().trim();
 
-            //check if method call has already been added...
-            if(oldValueStr.indexOf(value)!=-1)
-                return;
-
-            //check if multiple change listeners belong to parent component
-            //and if the previous rendered information has to be cleared
-            if(oldValueStr.indexOf("orgApacheMyfacesJsListenerSetExpressionProperty(")>
0
-                       && oldValueStr.indexOf(parent.getClientId(getFacesContext()))
< 0)
+            // render the jsValueChangeListener script only for each parent component 
+            if(oldValueStr.indexOf(parent.getClientId(FacesContext.getCurrentInstance()))
< 0
+            		&& oldValueStr.length() > 0)
             {
-                oldValueStr = oldValueStr.substring(0,oldValueStr.indexOf("orgApacheMyfacesJsListenerSetExpressionProperty("));
+            	oldValueStr = "";
             }
 
             if(oldValueStr.length()>0 && !oldValueStr.endsWith(";"))



Mime
View raw message