You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/02/21 01:02:40 UTC

svn commit: r379296 - /myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js

Author: werpu
Date: Mon Feb 20 16:02:39 2006
New Revision: 379296

URL: http://svn.apache.org/viewcvs?rev=379296&view=rev
Log:
fixed a bug which prevented the trigger on the ie

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js?rev=379296&r1=379295&r2=379296&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/statechangednotifier/resource/stateChangedNotifier.js Mon Feb 20 16:02:39 2006
@@ -63,12 +63,14 @@
 
     function addOnChangeListener(tagName)
     {
+    	
         var arrElements = document.getElementsByTagName(tagName);
-
+		
         for (var i=0; i<arrElements.length; i++)
         {
             dojo.event.browser.addListener(arrElements[i], "onchange", changeHiddenValue);
         }
+        
     }
 
     function addObjectsToConfirmList(tagName)
@@ -139,11 +141,17 @@
     function putConfirmInElement(commandId)
     {
         var command = document.getElementById(commandId);
-
         if (command != null)
         {
             var onclick = command.getAttribute("onclick");
-            command.setAttribute("onclick", "if ("+notifierName+".showMessage()) { "+onclick+" }");
+          	var onclickstr = "if ("+notifierName+".showMessage()) { "+onclick+" }";
+			
+			if(dojo.render.html.ie) { 
+				onclickstr = onclickstr.replace("function anonymous\\(\\)","");        
+		        command.setAttribute("onclick", new Function("",onclickstr));
+    		} else {
+    	        command.setAttribute("onclick", onclickstr);
+    		}
         }
     }