You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/11/17 12:17:22 UTC

svn commit: r1203152 [5/7] - in /wicket/trunk: wicket-core/src/main/java/org/apache/wicket/ajax/ wicket-core/src/main/java/org/apache/wicket/ajax/form/ wicket-core/src/main/java/org/apache/wicket/ajax/res/ wicket-core/src/main/java/org/apache/wicket/aj...

Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/wicket-event.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/wicket-event.js?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/wicket-event.js (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/wicket-event.js Thu Nov 17 11:17:20 2011
@@ -15,283 +15,314 @@
  * limitations under the License.
  */
  
+/*jshint evil: true, nomen: false, onevar: false, regexp: false, strict: true, boss: true, undef: true, maxlen: 160, curly: true, eqeqeq: true */
+/*global jQuery: false, DOMParser: true, Wicket: true, window: false, document: false, WicketAjaxDebug: false, wicketAjaxDebugEnabled: false */
+
+
 /*
- * Wicket Ajax Support 
+ * Wicket Ajax Support
  *
  * @author Igor Vaynberg
- * @author Matej Knopp 
+ * @author Matej Knopp
  */
 
-if (Function.prototype.bind == null) {
-	Function.prototype.bind = function(object) {
-		var __method = this;
-		return function() {
-			return __method.apply(object, arguments);
-		}
-	}
-}
+;(function (jQuery, window, document, undefined) {
+	'use strict';
 
-// Wicket Namespace
+	if (typeof(Wicket) === 'object') {
+		return;
+	}
 
-if (typeof(Wicket) == "undefined")
-	Wicket = { };
+	if (Function.prototype.bind === null) {
+		Function.prototype.bind = function (object) {
+			var self = this;
+			return function () {
+				return self.apply(object, arguments);
+			};
+		};
+	}
 
+	window.Wicket = {};
 
+	$.extend(Wicket, {
 
-/**
- * Browser types
- */
-if (typeof(Wicket.Browser) == "undefined") {
-	Wicket.Browser = { 
-		isKHTML: function() {
-			return /Konqueror|KHTML/.test(navigator.userAgent) && !/Apple/.test(navigator.userAgent);
-		},
-		
-		isSafari: function() {
-			return !/Chrome/.test(navigator.userAgent) && /KHTML/.test(navigator.userAgent) && /Apple/.test(navigator.userAgent);
-		},
-		
-		isChrome: function() {
-			return /KHTML/.test(navigator.userAgent) && /Apple/.test(navigator.userAgent) && /Chrome/.test(navigator.userAgent);
-		},
-		
-		isOpera: function() {
-			return !Wicket.Browser.isSafari() && typeof(window.opera) != "undefined";
-		},
-	
-		isIE: function() {
-			return !Wicket.Browser.isSafari() && typeof(document.all) != "undefined" && typeof(window.opera) == "undefined";
-		},
-		
-		isIEQuirks: function() {
-			// is the browser internet explorer in quirks mode (we could use document.compatMode too)		
-			return Wicket.Browser.isIE() && document.documentElement.clientHeight == 0;
-		},		
-		
-		isIELessThan7: function() {
-			var index = navigator.userAgent.indexOf("MSIE");
-			var version = parseFloat(navigator.userAgent.substring(index + 5));
-			return Wicket.Browser.isIE() && version < 7;
-		},
-		
-		isIE7: function() {
-			var index = navigator.userAgent.indexOf("MSIE");
-			var version = parseFloat(navigator.userAgent.substring(index + 5));
-			return Wicket.Browser.isIE() && version >= 7;
-		},
-		
+		Browser: {
+			isKHTML: function () {
+				return (/Konqueror|KHTML/).test(window.navigator.userAgent) && !/Apple/.test(window.navigator.userAgent);
+			},
+
+			isSafari: function () {
+				return !/Chrome/.test(window.navigator.userAgent) && /KHTML/.test(window.navigator.userAgent) && /Apple/.test(window.navigator.userAgent);
+			},
+
+			isChrome: function () {
+				return (/KHTML/).test(window.navigator.userAgent) && /Apple/.test(window.navigator.userAgent) && /Chrome/.test(window.navigator.userAgent);
+			},
+
+			isOpera: function () {
+				return !Wicket.Browser.isSafari() && typeof(window.opera) !== "undefined";
+			},
+
+			isIE: function () {
+				return !Wicket.Browser.isSafari() && typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
+			},
+
+			isIEQuirks: function () {
+				// is the browser internet explorer in quirks mode (we could use document.compatMode too)
+				return Wicket.Browser.isIE() && window.document.documentElement.clientHeight === 0;
+			},
+
+			isIELessThan7: function () {
+				var index = window.navigator.userAgent.indexOf("MSIE");
+				var version = parseFloat(window.navigator.userAgent.substring(index + 5));
+				return Wicket.Browser.isIE() && version < 7;
+			},
+
+			isIE7: function () {
+				var index = window.navigator.userAgent.indexOf("MSIE");
+				var version = parseFloat(window.navigator.userAgent.substring(index + 5));
+				return Wicket.Browser.isIE() && version >= 7;
+			},
+
+			isIELessThan9: function () {
+				var index = window.navigator.userAgent.indexOf("MSIE");
+				var version = parseFloat(window.navigator.userAgent.substring(index + 5));
+				return Wicket.Browser.isIE() && version < 9;
+			},
 
-		isIELessThan9: function() {
-			var index = navigator.userAgent.indexOf("MSIE");
-			var version = parseFloat(navigator.userAgent.substring(index + 5));
-			return Wicket.Browser.isIE() && version < 9;
+			isGecko: function () {
+				return (/Gecko/).test(window.navigator.userAgent) && !Wicket.Browser.isSafari();
+			}
 		},
-		
-		isGecko: function() {
-			return /Gecko/.test(navigator.userAgent) && !Wicket.Browser.isSafari();
-		}
-	};
-}
 
+		/**
+		 * Events related code
+		 * Based on code from Mootools (http://mootools.net)
+		 */
+		Event: {
+			idCounter: 0,
+
+			getId: function (element) {
+				var current = element.getAttribute("id");
+				if (typeof(current) === "string" && current.length > 0) {
+					return current;
+				} else {
+					current = "wicket-generated-id-" + Wicket.Event.idCounter++;
+					element.setAttribute("id", current);
+					return current;
+				}
+			},
 
+			keyCode: function (event) {
+    			if (typeof(event.keyCode) === "undefined") {
+        			return event.which;
+    			} else {
+        			return event.keyCode;
+    			}
+			},
+
+			/**
+			 * Prevent event from bubbling up in the element hierarchy.
+			 */
+			stop: function (e) {
+				e = Wicket.Event.fix(e);
+				e.cancelBubble = true;
+				if (e.stopPropagation) {
+					e.stopPropagation();
+				}
+				return e;
+			},
 
+			/**
+			 * If no event is given as argument (IE), window.event is returned.
+			 */
+			fix: function (e) {
+				if (typeof e === 'undefined') {
+					e = window.event;
+				}
+				return e;
+			},
 
-/**
- * Events related code
- * Based on code from Mootools (http://mootools.net)
- */
+			handler: function () {
+				var id = this[0];
+				var original = this[1];
+				var element = Wicket.$(id);
+				original.bind(element)();
+			},
+
+			fire: function (element, event) {
+				if (document.createEvent) {
+					var e = document.createEvent("Event");
+					e.initEvent(event, true, true);
+					return element.dispatchEvent(e);
+				} else {
+					return element.fireEvent("on" + event);
+				}
+			},
 
-if (typeof(Wicket.Event) == "undefined") {
-	Wicket.Event = {
-		idCounter: 0,
-		
-		getId: function(element) {
-			var current = element.getAttribute("id");
-			if (typeof(current) == "string" && current.length > 0) {
-				return current;
-			} else {
-				current = "wicket-generated-id-" + Wicket.Event.idCounter++;
-				element.setAttribute("id", current);
-				return current;
-			}
-		},
-		
-		handler: function() {
-			var id = this[0];
-			var original = this[1];
-			var element = Wicket.$(id);
-			original.bind(element)();
-		},
-	
-		fire: function(element, event) {
-			if (document.createEvent) {
-				var e=document.createEvent("Event");
-				e.initEvent(event, true, true);
-				return element.dispatchEvent(e);
-			} else {
-				return element.fireEvent("on"+event);
-			}
-		},
-		
-		// adds an event of specified type to the element
-		// also supports the domready event on window
-		// domready is event fired when the DOM is complete, but before loading external resources (images, ...)
-		add: function(element, type, fn) {
-			// is the event domready?
-			if (element == window && type == "domready") {
-				Wicket.Event.addDomReadyEvent(fn);
-			} else {
-				if (element.addEventListener){
-					element.addEventListener((type == 'mousewheel' && Wicket.Browser.isGecko()) ? 'DOMMouseScroll' : type, fn, false);
+			// adds an event of specified type to the element
+			// also supports the domready event on window
+			// domready is event fired when the DOM is complete, but before loading external resources (images, ...)
+			add: function (element, type, fn) {
+				// is the event domready?
+				if (element === window && type === "domready") {
+					Wicket.Event.addDomReadyEvent(fn);
 				} else {
-					if (element == window || element == document)   {
-						fn = fn.bind(element);
+					if (element.addEventListener) {
+						element.addEventListener((type === 'mousewheel' && Wicket.Browser.isGecko()) ? 'DOMMouseScroll' : type, fn, false);
+					} else {
+						if (element === window || element === document)   {
+							fn = fn.bind(element);
+						}
+						else {
+							fn = Wicket.Event.handler.bind([Wicket.Event.getId(element), fn]);					
+						}				
+						// Because of the fn.bind (returning a new function object)
+						// you can't detach the event first to be sure that there are no doubles :(
+						//element.detachEvent('on'+type, fn);
+						element.attachEvent('on' + type, fn);
 					}
-					else {
-						fn = Wicket.Event.handler.bind([Wicket.Event.getId(element), fn]);					
-					}				
-					// Because of the fn.bind (returning a new function object)
-					// you can't detach the event first to be sure that there are no doubles :(
-					//element.detachEvent('on'+type, fn);
-					element.attachEvent('on'+type, fn);
 				}
-			}
-			return element;
-		},
-		
-		// handlers that will be fired on dom ready event
-		domReadyHandlers : new Array(),
-		
-		// fires the dom ready event and cleanup the handlers
-		fireDomReadyHandlers : function() {
-			var h = Wicket.Event.domReadyHandlers;
-			while (h.length > 0) {
-				var c = h.shift();
-				c();
-			}
-			Wicket.Event.domReadyHandlers = null;
-		},
-		
-		// adds the dom ready event 
-		addDomReadyEvent : function(fn) {
-			// is the window already loaded?
-			if (window.loaded)  {
-				fn();
-			} else if (!window.events || !window.events.domready) {
-				// register the handler
-				Wicket.Event.domReadyHandlers.push(fn);
-			
-				// callback
-				var domReady = function() {
-					if (window.loaded) 
-						return;
-					window.loaded = true;
-					
-					// invoke the handlers
-					Wicket.Event.fireDomReadyHandlers();
-				}.bind(this);
-				
-				if (document.readyState && 
-				    (Wicket.Browser.isKHTML() || 
-				    Wicket.Browser.isSafari() ||
-				    Wicket.Browser.isChrome())
-				) { 
-				  // chrome, safari and konqueror don't support the event - simulate it through a timeout
-					var domCheck = function() {
-						if (document.readyState == "loaded" ||
-						    document.readyState == "complete") {
-						    domReady();
-						} else {
-							// dom not yet ready, set timer to check later
-							window.setTimeout(domCheck, 10);
+				return element;
+			},
+
+			// handlers that will be fired on dom ready event
+			domReadyHandlers : [],
+
+			// fires the dom ready event and cleanup the handlers
+			fireDomReadyHandlers : function () {
+				var h = Wicket.Event.domReadyHandlers;
+				while (h.length > 0) {
+					var c = h.shift();
+					c();
+				}
+				Wicket.Event.domReadyHandlers = null;
+			},
+
+			// adds the dom ready event 
+			addDomReadyEvent : function (fn) {
+				// is the window already loaded?
+				if (window.loaded)  {
+					fn();
+				} else if (!window.events || !window.events.domready) {
+					// register the handler
+					Wicket.Event.domReadyHandlers.push(fn);
+
+					// callback
+					var domReady = function () {
+						if (window.loaded) {
+							return;
 						}
-					}
-					window.setTimeout(domCheck, 10);
-				} else if (document.readyState && Wicket.Browser.isIE()) { 
-					if (document.getElementById('ie_ready') == null) {
-						// for internet explorer we need to load a "dummy" scrip from ::/ to get the 
-						// readystatechangeevernt - that means the main page being loaded and now the browser
-						// is loading dependencies
-						var src = (window.location.protocol == 'https:') ? '\/\/:' : 'javascript:void(0)';
-						document.write('<script id="ie_ready" defer src="' + src + '"><\/script>');
-						document.getElementById('ie_ready').onreadystatechange = function() {
-							if (this.readyState == 'complete') domReady();
+						window.loaded = true;
+						
+						// invoke the handlers
+						Wicket.Event.fireDomReadyHandlers();
+					}.bind(this);
+					
+					if (document.readyState && 
+					    (Wicket.Browser.isKHTML() || 
+					    Wicket.Browser.isSafari() ||
+					    Wicket.Browser.isChrome())
+					) { 
+					  // chrome, safari and konqueror don't support the event - simulate it through a timeout
+						var domCheck = function () {
+							if (document.readyState === "loaded" ||
+							    document.readyState === "complete") {
+							    domReady();
+							} else {
+								// dom not yet ready, set timer to check later
+								window.setTimeout(domCheck, 10);
+							}
 						};
+						window.setTimeout(domCheck, 10);
+					} else if (document.readyState && Wicket.Browser.isIE()) { 
+						if ($('#ie_ready').length === 0) {
+							// for internet explorer we need to load a "dummy" scrip from ::/ to get the 
+							// readystatechangeevernt - that means the main page being loaded and now the browser
+							// is loading dependencies
+							var src = (window.location.protocol === 'https:') ? '\/\/:' : 'javascript:void(0)';
+							document.write('<script id="ie_ready" defer src="' + src + '"><\/script>');
+							document.getElementById('ie_ready').onreadystatechange = function () {
+								if (this.readyState === 'complete') {
+									domReady();
+								}
+							};
+						}
+					} else { 
+						// other browsers
+						Wicket.Event.add(document, "DOMContentLoaded", domReady);
 					}
-				} else { 
-					// other browsers
-					Wicket.Event.add(document, "DOMContentLoaded", domReady);
+				} else {
+					window.addEventListener("domready", fn, false);
 				}
-			} else {
-				window.addEventListener("domready", fn, false);
-			}
-		},
-       
-		/**
-		* A hash of subscribers per topic.
-		* String -> Array[Function].
-		*/
-		subscribers : {},
+			},
+	       
+			/**
+			* A hash of subscribers per topic.
+			* String -> Array[Function].
+			*/
+			subscribers : {},
+	
+			/**
+			* Adds a subscriber for the passed topic.
+			* 
+			* @param String topic - the channel name for which this subscriber will be notified
+			*        If '*' then it will be notified for all topics
+			* @param Function subscriber - the callback to call when an event with this type is published
+			*/    
+			subscribe: function (topic, subscriber) {
+				if (typeof(topic) === 'undefined' || topic === null) {
+					return;
+				}
+			   
+				var subscribers;
 
-		/**
-		* Adds a subscriber for the passed topic.
-		* 
-		* @param String topic - the channel name for which this subscriber will be notified
-		*        If '*' then it will be notified for all topics
-		* @param Function subscriber - the callback to call when an event with this type is published
-		*/    
-		subscribe: function(topic, subscriber) {
-		   if (typeof(topic) === 'undefined' || topic === null) {
-			   return;
-		   }
-		   
-		   var subscribers;
-		   
-		   subscribers = Wicket.Event.subscribers[topic];
-		   if (typeof(subscribers) === 'undefined' || subscribers === null) {
-			   subscribers = [];
-			   Wicket.Event.subscribers[topic] = subscribers;
-		   }
-		   
-		   subscribers.push(subscriber);
-		},
+				subscribers = Wicket.Event.subscribers[topic];
+				if (typeof(subscribers) === 'undefined' || subscribers === null) {
+					subscribers = [];
+					Wicket.Event.subscribers[topic] = subscribers;
+				}
+			   
+				subscribers.push(subscriber);
+			},
+	
+			/**
+			* Sends a notification to all subscribers for the given topic.
+			* Subscribers for topic '*' receive the actual topic as first parameter,
+			* otherwise the topic is not passed to subscribers which listen for specific 
+			* event types.
+			*
+			* @param String topic - the channel name for which all subscribers will be notified.
+			*/
+			publish: function (topic) {
+				if (typeof(topic) === 'undefined' || topic === null) {
+					return;
+				}
+			   
+				var subscribers, subscriberArguments;
+	
+				// notify all subscribers for this specific event type            
+				subscribers = Wicket.Event.subscribers[topic];
+				if (subscribers instanceof Array) {
+	
+					// cut the topic argument
+					subscriberArguments = Array.prototype.slice.call(arguments).slice(1);
 
-		/**
-		* Sends a notification to all subscribers for the given topic.
-		* Subscribers for topic '*' receive the actual topic as first parameter,
-		* otherwise the topic is not passed to subscribers which listen for specific 
-		* event types.
-		*
-		* @param String topic - the channel name for which all subscribers will be notified.
-		*/
-		publish: function(topic) {
-		   if (typeof(topic) === 'undefined' || topic === null) {
-			   return;
-		   }
-		   
-		   var subscribers, subscriberArguments;
-
-		   // notify all subscribers for this specific event type            
-		   subscribers = Wicket.Event.subscribers[topic];
-		   if (subscribers instanceof Array) {
-
-			   // cut the topic argument
-			   subscriberArguments = Array.prototype.slice.call(arguments).slice(1);
-		   
-			   for (var i = 0; i < subscribers.length; ++i) {
-				   subscribers[i].apply(this, subscriberArguments);
-			   }
-		   }
-		   
-		   // notify all subscribers which listen for any kind of events
-		   // and pass them the event type as first parameter
-		   subscribers = Wicket.Event.subscribers['*'];
-		   if (subscribers instanceof Array) {
-
-			   for (var i = 0; i < subscribers.length; ++i) {
-				   subscribers[i].apply(this, arguments);
-			   }
-		   }
-		}           
-	};
-}
+					for (var i = 0; i < subscribers.length; ++i) {
+						subscribers[i].apply(this, subscriberArguments);
+					}
+				}
+			   
+				// notify all subscribers which listen for any kind of events
+				// and pass them the event type as first parameter
+				subscribers = Wicket.Event.subscribers['*'];
+				if (subscribers instanceof Array) {
+
+					for (var j = 0; j < subscribers.length; ++j) {
+						subscribers[j].apply(this, arguments);
+					}
+				}
+			}       
+		}
+	});
+})(jQuery, window, document);
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html Thu Nov 17 11:17:20 2011
@@ -1,9 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]^]^>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -11,4 +12,4 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-comp";
 /*]^]^>*/
 </script>
-</head>]]></header-contribution><component id="comp1" ><![CDATA[<span wicket:id="comp" id="comp1" onclick="var wcall=wicketAjaxGet(&#039;page?0-1.IBehaviorListener.0-comp&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;comp1&#039;) != null;}.bind(this));">body</span>]]></component></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="comp1" ><![CDATA[<span wicket:id="comp" id="comp1" onclick="var wcall=Wicket.Ajax.get(&#039;page?0-1.IBehaviorListener.0-comp&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;comp1&#039;) != null;}.bind(this));">body</span>]]></component></ajax-response>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html xmlns:wicket>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -13,6 +14,6 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
 /*]]>*/
 </script>
 </head><body>
-  <span wicket:id="comp" id="comp1" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-comp&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;comp1&#039;) != null;}.bind(this));">body</span>
+  <span wicket:id="comp" id="comp1" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-comp&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;comp1&#039;) != null;}.bind(this));">body</span>
 </body>
 </html>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html Thu Nov 17 11:17:20 2011
@@ -26,11 +26,13 @@ Wicket.Event.add(window, "domready", fun
 Wicket.Event.add(window, "load", function(event) { onLoadB();;});
 /*]]>*/
 </script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -57,6 +59,6 @@ test
 <span wicket:id="btest3" id="btest36"><wicket:panel>
 test
 </wicket:panel></span>
-<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link7" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-link&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;link7&#039;) != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link7" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-link&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;link7&#039;) != null;}.bind(this));return !wcall;">Test</a>
 </body>
 </html>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html Thu Nov 17 11:17:20 2011
@@ -13,11 +13,13 @@ Wicket.Event.add(window, "domready", fun
 Wicket.Event.add(window, "load", function(event) { onLoad();;});
 /*]]>*/
 </script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -35,6 +37,6 @@ test
 <span wicket:id="test3" id="test33"><wicket:panel>
 test
 </wicket:panel></span>
-<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link4" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-link&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;link4&#039;) != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link4" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-link&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;link4&#039;) != null;}.bind(this));return !wcall;">Test</a>
 </body>
 </html>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html Thu Nov 17 11:17:20 2011
@@ -1,9 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]^]^>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -11,4 +12,4 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-test";
 /*]^]^>*/
 </script>
-</head>]]></header-contribution><component id="test1" ><![CDATA[<a href="page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var wcall=wicketAjaxGet(&#039;page?0-1.IBehaviorListener.0-test&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;test1&#039;) != null;}.bind(this));return !wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="test1" ><![CDATA[<a href="page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var wcall=Wicket.Ajax.get(&#039;page?0-1.IBehaviorListener.0-test&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;test1&#039;) != null;}.bind(this));return !wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -12,6 +13,7 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.ajax.DomReadyOrderPage?0";
 /*]]>*/
 </script>
+<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
 <script type="text/javascript" >
 /*<![CDATA[*/
 Wicket.Event.add(window, "domready", function(event) { test1();;});
@@ -23,6 +25,6 @@ Wicket.Event.add(window, "domready", fun
 /*]]>*/
 </script>
 </head><body>
-<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-test&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;test1&#039;) != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-test&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;test1&#039;) != null;}.bind(this));return !wcall;">Test</a>
 </body>
 </html>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-	<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+	<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -16,7 +17,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
 		<form wicket:id="form" id="form1" method="post" action="../page?0-1.IFormSubmitListener-form"><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input type="hidden" name="form1_hf_0" id="form1_hf_0" /></div>
 			<input type="text" wicket:id="txt1" value="foo" name="txt1"/>
 			<input type="text" wicket:id="txt2" value="bar" name="txt2"/>
-			<input type="submit" value="Submit" wicket:id="submit" name=":submit" id="submit2" onclick="var wcall=wicketSubmitFormById(&#039;form1&#039;, &#039;../page?0-1.IBehaviorListener.0-form-submit&#039;, &#039;:submit&#039; ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this)&amp;&amp;Wicket.$$(&#039;form1&#039;)}.bind(this));;; return false;"/>
+			<input type="submit" value="Submit" wicket:id="submit" name=":submit" id="submit2" onclick="var wcall=Wicket.Ajax.submitForm(&#039;form1&#039;, &#039;../page?0-1.IBehaviorListener.0-form-submit&#039;, &#039;:submit&#039; ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this) &amp;&amp; Wicket.$$(&#039;form1&#039;)}.bind(this));;; return false;"/>
 		</form>	
 	</body>
 </html>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-	<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+	<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -12,6 +13,7 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.ajax.form.OnChangeAjaxBehaviorTestPage?0";
 /*]]>*/
 </script>
+<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
 <script type="text/javascript" >
 /*<![CDATA[*/
 Wicket.Event.add(window, "domready", function(event) { new Wicket.ChangeHandler('field1');;});
@@ -19,9 +21,9 @@ Wicket.Event.add(window, "domready", fun
 </script>
 </head><body>
 		<form wicket:id="form" id="form2" method="post" action="../page?0-1.IFormSubmitListener-form"><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input type="hidden" name="form2_hf_0" id="form2_hf_0" /></div>
-			<input type="text" wicket:id="field" value="" name="field" id="field1" onchange="var wcall=wicketAjaxPost(&#039;../page?0-1.IBehaviorListener.0-form-field&#039;, wicketSerialize(Wicket.$(&#039;field1&#039;)),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;field1&#039;) != null;}.bind(this));"/>
+			<input type="text" wicket:id="field" value="" name="field" id="field1" onchange="var wcall=Wicket.Ajax.post(&#039;../page?0-1.IBehaviorListener.0-form-field&#039;, Wicket.Form.serialize(Wicket.$(&#039;field1&#039;)),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;field1&#039;) != null;}.bind(this));"/>
 	
-			<select wicket:id="dropDown" name="dropDown" id="dropDown3" onchange="var wcall=wicketAjaxPost(&#039;../page?0-1.IBehaviorListener.0-form-dropDown&#039;, wicketSerialize(Wicket.$(&#039;dropDown3&#039;)),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;dropDown3&#039;) != null;}.bind(this));">
+			<select wicket:id="dropDown" name="dropDown" id="dropDown3" onchange="var wcall=Wicket.Ajax.post(&#039;../page?0-1.IBehaviorListener.0-form-dropDown&#039;, Wicket.Form.serialize(Wicket.$(&#039;dropDown3&#039;)),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;dropDown3&#039;) != null;}.bind(this));">
 <option selected="selected" value="">Choose One</option>
 </select>
 		</form>			

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -14,6 +15,6 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
 </script>
 </head><body>
   <span wicket:id="ajaxLabel" id="ajaxLabel1">UpdateMe</span>
-  <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
+  <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
 </body>
 </html>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -17,7 +18,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
     Border
     <wicket:body>
     <span wicket:id="ajaxLabel" id="ajaxLabel1">UpdateMe</span>
-    <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-border-border_body-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
+    <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-border-border_body-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
   </wicket:body>
     Border
   </wicket:border></span>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -22,7 +23,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
                             <td width = "100%">
                                 <wicket:body>
 	  <span wicket:id="ajaxLabel" id="ajaxLabel1">AAAAAAA</span>
-	  <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-pageLayout-pageLayout_body-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
+	  <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-pageLayout-pageLayout_body-ajaxLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxLink2&#039;) != null;}.bind(this));return !wcall;">Update</a>
   </wicket:body>
                             </td>
                         </tr>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html Thu Nov 17 11:17:20 2011
@@ -1,9 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]^]^>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -11,4 +12,4 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1";
 /*]^]^>*/
 </script>
-</head>]]></header-contribution><component id="linja11" ><![CDATA[<span wicket:id="linja1" id="linja11">1</span>]]></component><evaluate><![CDATA[setTimeout("var wcall=wicketAjaxGet('page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function() { }.bind(this),function() { }.bind(this), function() {var c = Wicket.$('linja11'); return typeof(c) != 'undefined' && c != null}.bind(this));", 2000);]]></evaluate></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="linja11" ><![CDATA[<span wicket:id="linja1" id="linja11">1</span>]]></component><evaluate><![CDATA[setTimeout("var wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function() { }.bind(this),function() { }.bind(this), function() {var c = Wicket.$('linja11'); return typeof(c) != 'undefined' && c != null}.bind(this));", 2000);]]></evaluate></ajax-response>
\ No newline at end of file

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,12 +1,13 @@
 <html>
 <head>
   <title>ajax-test</title>
-<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -14,9 +15,10 @@ wicketAjaxDebugEnable=true;
 Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.ajax.markup.html.componentMap.SimpleTestPage?0";
 /*]]>*/
 </script>
+<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
 <script type="text/javascript" >
 /*<![CDATA[*/
-Wicket.Event.add(window, "load", function(event) { setTimeout("var wcall=wicketAjaxGet('../page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function() { }.bind(this),function() { }.bind(this), function() {var c = Wicket.$('linja11'); return typeof(c) != 'undefined' && c != null}.bind(this));", 2000);;});
+Wicket.Event.add(window, "load", function(event) { setTimeout("var wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function() { }.bind(this),function() { }.bind(this), function() {var c = Wicket.$('linja11'); return typeof(c) != 'undefined' && c != null}.bind(this));", 2000);;});
 /*]]>*/
 </script>
 </head>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html Thu Nov 17 11:17:20 2011
@@ -1,13 +1,14 @@
 <? xml version= "1.0" encoding ="UTF-8" ?>
 <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
-<html wicket:id="html" xmlns:wicket="" xmlns="http://www.w3.org/1999/xhtml" xmlns:lang="[current language]" lang="de" id="html1" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.1-html&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;html1&#039;) != null;}.bind(this));return !wcall;">
-  <head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<html wicket:id="html" xmlns:wicket="" xmlns="http://www.w3.org/1999/xhtml" xmlns:lang="[current language]" lang="de" id="html1" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.1-html&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;html1&#039;) != null;}.bind(this));return !wcall;">
+  <head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html xmlns:wicket>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -14,7 +15,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
 </script>
 </head><body>
   <div wicket:id="hideable"><wicket:border>
-  <a wicket:id="hideLink" id="hideLink1" href="#" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-hideable-hideLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;hideLink1&#039;) != null;}.bind(this));return !wcall;">Hide contents</a>
+  <a wicket:id="hideLink" id="hideLink1" href="#" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-hideable-hideLink&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;hideLink1&#039;) != null;}.bind(this));return !wcall;">Hide contents</a>
   <div wicket:id="wrapper" id="wrapper2">
   <wicket:body>
     Contents <span wicket:id="content">label</span>

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html xmlns:wicket>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -26,7 +27,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
 
 
 
-<a wicket:id="ajaxRefresh" id="ajaxRefresh2" href="#" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-provider-ajaxRefresh&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxRefresh2&#039;) != null;}.bind(this));return !wcall;">AJAX refresh</a>
+<a wicket:id="ajaxRefresh" id="ajaxRefresh2" href="#" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-provider-ajaxRefresh&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;ajaxRefresh2&#039;) != null;}.bind(this));return !wcall;">AJAX refresh</a>
 
 </wicket:panel></div>
 

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html Thu Nov 17 11:17:20 2011
@@ -1,10 +1,11 @@
 <html xmlns:wicket>
-<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketJQueryReference/res/js/jquery/jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketEventReference/res/js/wicket-event-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/res/js/wicket-ajax-jquery.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-wicketAjaxDebugEnable=true;
+Wicket.Ajax.DebugWindow.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
@@ -18,7 +19,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
   <span wicket:id="number">0</span><br/>
   <div id="nextContainer1" style="display:none"></div>
 </div>
-<a wicket:id="add" id="add2" href="#" onclick="var wcall=wicketAjaxGet(&#039;../page?0-1.IBehaviorListener.0-add&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;add2&#039;) != null;}.bind(this));return !wcall;">Add</a>
+<a wicket:id="add" id="add2" href="#" onclick="var wcall=Wicket.Ajax.get(&#039;../page?0-1.IBehaviorListener.0-add&#039;,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$(&#039;add2&#039;) != null;}.bind(this));return !wcall;">Add</a>
 
 
 

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Thu Nov 17 11:17:20 2011
@@ -37,6 +37,7 @@ public class ApacheLicenceHeaderTest ext
 		 */
 		htmlIgnore.add("src/main/java/org/apache/wicket/util/diff");
 		htmlIgnore.add("src/main/java/org/apache/wicket/markup/html/pages");
+		htmlIgnore.add("src/main/java/org/apache/wicket/ajax/res/js/jquery");
 
 		/*
 		 * See NOTICE.txt
@@ -48,6 +49,7 @@ public class ApacheLicenceHeaderTest ext
 		 * what the test is about.
 		 */
 		cssIgnore.add("src/test/java");
+		cssIgnore.add("src/test/js/qunit/qunit.css");
 
 		xmlIgnore.add("src/assembly/bin.xml");
 
@@ -88,7 +90,8 @@ public class ApacheLicenceHeaderTest ext
 		/*
 		 * See NOTICE.txt
 		 */
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/ajax/wicket-ajax-debug-drag.js");
 		javaScriptIgnore.add("src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js");
+		javaScriptIgnore.add("src/main/java/org/apache/wicket/ajax/res/js/jquery");
+		javaScriptIgnore.add("src/test/js/qunit/qunit.js");
 	}
 }

Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java?rev=1203152&r1=1203151&r2=1203152&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java Thu Nov 17 11:17:20 2011
@@ -980,7 +980,8 @@ public class WicketTesterTest extends Wi
 	public void startResourceReference()
 	{
 		tester.startResourceReference(WicketAjaxReference.INSTANCE);
-		tester.assertContains("wicketAjaxGet()");
+		// verify that a random string from that resource is in the response
+		tester.assertContains("getAjaxBaseUrl");
 	}
 
 	/**
@@ -990,7 +991,8 @@ public class WicketTesterTest extends Wi
 	public void startResource()
 	{
 		tester.startResource(WicketAjaxReference.INSTANCE.getResource());
-		tester.assertContains("wicketAjaxGet()");
+		// verify that a random string from that resource is in the response
+		tester.assertContains("getAjaxBaseUrl");
 	}
 
 	/**

Added: wicket/trunk/wicket-core/src/test/js/ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/ajax.js?rev=1203152&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/js/ajax.js (added)
+++ wicket/trunk/wicket-core/src/test/js/ajax.js Thu Nov 17 11:17:20 2011
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+jQuery(document).ready(function() {
+
+	/**
+	 * Emulates an Ajax response from <script> element's body.
+	 * Using script element's body is cross browser compatible
+	 */
+	var loadData = function (id) {
+		var node = Wicket.$(id);
+		var text = "", i;
+
+		if (node.hasChildNodes()) {
+			for (i = 0; i < node.childNodes.length; i++) {
+				text = text + node.childNodes[i].nodeValue;
+			}
+		}
+		return text;
+	}
+
+	execute = function (dataElementId, options) {
+		
+		var defaults = {
+				parseResponse: true,
+				randomUrl: false,
+				failureHandler: function () {
+					start();
+					ok(false, 'Failure handler should not be called!');
+				},
+				channel: '0|s',
+				successHandler: function () {
+					start();
+					ok(true, 'Success handler is executed');
+				},
+				url: 'dummy/url',
+				transport: {
+					abort: function() {},
+					responseText: loadData(dataElementId),  // emulates Ajax response
+					responseXML: Wicket.Xml.parse(loadData(dataElementId)),  // emulates Ajax response (IE)
+					status: 200,
+					readyState: 4
+				}
+		};
+		var opts = jQuery.extend({}, defaults, options);
+		var call = new Wicket.Ajax.Call(opts.url, opts.successHandler, opts.failureHandler, opts.channel);
+		var request = new Wicket.Ajax.Request(opts.url, call.loadedCallback.bind(call), opts.parseResponse, opts.randomUrl, opts.channel, opts.successHandler);
+
+		request.transport = opts.transport;
+
+		request.stateChangeCallback();
+	};
+
+	module('Wicket.Ajax.stateChangeCallback');
+
+	asyncTest('Wicket.Ajax - processEvaluation with mock data.', function () {
+
+		expect(2);
+
+		execute('evaluationId');
+	});
+
+	asyncTest('Wicket.Ajax - processEvaluation with mock data (priority-evaluate).', function () {
+
+		expect(2);
+
+		execute('priorityEvaluationId');
+	});
+	
+	asyncTest('Wicket.Ajax - processEvaluation with identifier|code.', function () {
+
+		expect(2);
+
+		execute('evaluationIdentifierAndCodeId');
+	});
+
+	asyncTest('Wicket.Ajax - processComponent, normal case.', function () {
+
+		expect(2);
+
+		var options = {
+			successHandler: function() {
+				start();
+				
+				equal(jQuery('#componentToReplace').text(), 'new body', 'The component must be replaced');
+			}
+		};
+
+		equal(jQuery('#componentToReplace').text(), 'old body', 'The component is existing and has the old innerHTML');
+
+		execute('componentId', options);
+	});
+
+
+	asyncTest('Wicket.Ajax - processComponent() but the old component doesn\'t exist.', function () {
+
+		expect(2);
+
+		var oldWicketLogError = Wicket.Log.error;
+		
+		Wicket.Log.error = function(msg) {
+			start();
+			equals(msg, 'Wicket.Ajax.Call.processComponent: Component with id [[componentToReplaceDoesNotExist]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.');
+
+			// restore the original method
+			Wicket.Log.error = oldWicketLogError;
+		};
+
+		var options = {
+			successHandler: function() {
+				equals(jQuery('#componentToReplaceDoesNotExist').length, 0, 'A component with id \'componentToReplaceDoesNotExist\' must not exist!');
+			}
+		};
+
+		execute('componentDoesNotExistsId', options);
+	});
+
+	asyncTest('Wicket.Ajax - processComponent() replace a component with a table with scripts inside.', function () {
+
+		expect(4);
+
+		var options = {
+			successHandler: function() {
+				start();
+				equals(jQuery('#componentToReplace')[0].tagName.toLowerCase(), 'table', 'A component with id \'componentToReplace\' must be a table now!');
+			}
+		};
+
+		execute('complexComponentId', options);
+	});
+
+	
+	asyncTest('Wicket.Ajax - processComponent() replace title\'s text.', function () {
+
+		expect(1);
+
+		var oldTitle = jQuery('title').text();
+
+		var options = {
+			successHandler: function() {
+				start();
+				var $title = jQuery('title');
+				equal($title.text(), 'new title', 'The title text should be updated!');
+				$title.text(oldTitle);
+			}
+		};
+
+		execute('componentToReplaceTitle', options);
+	});
+});

Added: wicket/trunk/wicket-core/src/test/js/all.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/all.html?rev=1203152&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/js/all.html (added)
+++ wicket/trunk/wicket-core/src/test/js/all.html Thu Nov 17 11:17:20 2011
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+	<title id="titleId">All tests</title>
+	<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
+	<script src="../../main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js"></script>
+	<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js"></script>
+	<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js"></script>
+	<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-debug.js"></script>
+	<script type="text/javascript" src="qunit/qunit.js"></script>
+
+	<!-- the module under test -->
+	<script type="text/javascript" src="ajax.js"></script>
+	<script type="text/javascript" src="dom.js"></script>
+	<script type="text/javascript" src="event.js"></script>
+	<script type="text/javascript" src="form.js"></script>
+	<script type="text/javascript" src="head.js"></script>
+</head>
+<body>
+	<h1 id="qunit-header">QUnit example</h1>
+	<h2 id="qunit-banner"></h2>
+	<div id="qunit-testrunner-toolbar"></div>
+	<h2 id="qunit-userAgent"></h2>
+	<ol id="qunit-tests"></ol>
+	<div id="qunit-fixture">
+
+		test markup, will be hidden
+
+		<!--
+			AJAX
+		-->
+		<textarea id="evaluationId"><ajax-response><evaluate>ok(true, 'Evaluation must be executed!');</evaluate></ajax-response></textarea>
+
+		<textarea id="priorityEvaluationId"><ajax-response><priority-evaluate>ok(true, 'Priority Evaluation must be executed!');</priority-evaluate></ajax-response></textarea>
+
+		<!--
+			Executes the second part of 'something|functionBody' by passing 'notify' function as parameter
+		-->
+		<textarea id="evaluationIdentifierAndCodeId"><ajax-response><evaluate>ignored|start(); ok(true, 'Evaluation with identifier must be executed!'); arguments[0]();</evaluate></ajax-response></textarea>
+
+		<div id="componentToReplace">old body</div>
+
+		<textarea id="componentId"><ajax-response><component id="componentToReplace"><![CDATA[<span id="componentToReplace">new body</span>]]></component></ajax-response></textarea>
+
+
+		<textarea id="componentDoesNotExistsId"><ajax-response><component id="componentToReplaceDoesNotExist"><![CDATA[<span id="componentToReplaceDoesNotExist">new body</span>]]></component></ajax-response></textarea>
+
+
+		<textarea id="complexComponentId"><ajax-response><component id="componentToReplace"><![CDATA[
+
+			<table id="componentToReplace">
+				<thead>
+					<tr>
+						<th><div><script>start(); ok(true, 'script in thead > td has to be executed')</script></div>
+						</th>
+						<th>header 2</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>data 1
+<script>start(); ok(true, 'script in tbody > td has to be executed')</script>
+						</td>
+						<td>data 2</td>
+					</tr>
+				</tbody>
+				<tfoot>
+					<tr>
+						<td>footer 1</td>
+						<td>footer 2
+							<script>start(); ok(true, 'script in tfoot > td has to be executed')</script>
+						</td>
+					</tr>
+				</tfoot>
+			</table>
+
+		]]></component></ajax-response></textarea>
+
+		<textarea id="componentToReplaceTitle">
+		<ajax-response><component id="titleId"><![CDATA[<title id="titleId">new title</title>]]></component></ajax-response>
+		</textarea>
+
+		<!--
+			DOM
+		-->
+				<span id="testElement"></span>
+
+		<div id="complexElement">
+			<a href="some/url">Link</a>
+		</div>
+
+		<iframe id="testInDocIFrame"></iframe>
+
+		<span id="toBeReplacedByTable"></span>
+		<span id="toBeReplacedByScript"></span>
+		<span id="toBeReplacedByDivWithChildren"></span>
+
+		<!--
+			Event
+		-->		
+		<span id="specifiedId" class="getIdClass1"></span>
+		<span class="getIdClass2"></span>
+
+		<!--
+			Form
+		-->
+				<form id="testForm" action="actionUrl">
+
+			<input type="text" id="textInputId" name="textInput" value="textValue"/>
+
+			<input type="text" id="textInputUTFId" name="textUTFInput" value="нещо на български"/>
+
+			<input type="checkbox" name="checkBoxInput1" checked="checked" value="cbValue1"/>
+			<input type="checkbox" name="checkBoxInput2" value="cbValue2"/>
+			<input type="checkbox" name="checkBoxInput3" checked="checked" value="cbValue3"/>
+
+			<input type="radio" name="radioInput" checked="checked" value="radioValue1"/>
+			<input type="radio" name="radioInput" value="radioValue2"/>
+
+			<input type="email" id="emailInputId" name="emailInput" value="m@g.com"/>
+
+			<input type="url" id="urlInputId" name="urlInput" value="http://example.com"/>
+
+			<input type="search" id="searchInputId" name="searchInput" value="wicket"/>
+
+			<input type="range" id="rangeInputId" name="rangeInput" min="0" max="100" value="67"/>
+
+			<input type="number" id="numberInputId" name="numberInput" min="0" max="100" value="16"/>
+
+			<input type="color" id="colorInputId" name="colorInput" value="123456"/>
+
+			<select id="multipleSelectId" name="multipleSelect" multiple="multiple">
+				<option value="0" selected="selected">zero</option>
+				<option value="1">one</option>
+				<option value="2" selected="selected">two</option>
+			</select>
+
+			<select id="selectId" name="select">
+				<option value="0" selected="selected">zero</option>
+				<option value="1">one</option>
+				<option value="2">two</option>
+			</select>
+
+			<textarea name="textArea">some text</textarea>
+
+		</form>
+
+	
+	</div>
+</body>
+</html>

Added: wicket/trunk/wicket-core/src/test/js/data/test.css
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/data/test.css?rev=1203152&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/js/data/test.css (added)
+++ wicket/trunk/wicket-core/src/test/js/data/test.css Thu Nov 17 11:17:20 2011
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+body {
+	font-size: 24px;
+}

Added: wicket/trunk/wicket-core/src/test/js/data/test.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/data/test.js?rev=1203152&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/js/data/test.js (added)
+++ wicket/trunk/wicket-core/src/test/js/data/test.js Thu Nov 17 11:17:20 2011
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var something = "else";