rem: text = "var f = function(" + res[1] + ") {" + res[2] +"};";  try {  eval(text); f(notify); } catch (exception) { Wicket.Log.error("Exception evaluating javascript: " + exception); }  } else {  try {  eval(text); } catch (exception) { Wicket.Log.error("Exception evaluating javascript: " + exception); }  notify(); 
add:  if (node.hasChildNodes()) { text = node.firstChild.nodeValue; 
context: 		steps.push(function(notify) {			// get the javascript body		    var text = node.firstChild.nodeValue;		    		    // unescape it if necessary		    var encoding = node.getAttribute("encoding");		    if (encoding != null) {		        text = Wicket.decode(encoding, text);		    }		    		    // test if the javascript is in form of identifier|code		    // if it is, we allow for letting the javascript decide when the rest of processing will continue 		    // by invoking identifier();		    var res = text.match(new RegExp("^([a-z|A-Z_][a-z|A-Z|0-9_]*)\\|((.|\\n)*)$"));		    		     		    if (res != null) {		    	text = "var f = function(" + res[1] + ") {" + res[2] +"};";		    			    			    	try {			   		// do the evaluation			    	eval(text);			    	f(notify);			    } catch (exception) {			    	Wicket.Log.error("Exception evaluating javascript: " + exception);			    }		    			    } else {		    	// just evaluate the javascript			    try {			   		// do the evaluation			    	eval(text);			    } catch (exception) {			    	Wicket.Log.error("Exception evaluating javascript: " + exception);			    }			    // continue to next step				notify();			}		});		
meta: 1204	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1204/c4e708e2653ee82392c5f20ddbdd2a54e3b1687c/wicket-ajax.js/buggy/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js