You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/06/10 16:27:54 UTC

svn commit: r413306 [11/17] - in /tapestry/tapestry4/trunk: examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/ framework/src/java/org/apache/tapestry/ framework/src/java/org/apache/tapestry/dojo/form/ framework/src/java/org/apache/tape...

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/undo/browser.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/undo/browser.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/undo/browser.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/undo/browser.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,273 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.undo.browser");
+dojo.require("dojo.io");
+
+try{
+	if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
+		document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(dojo.hostenv.getBaseScriptUri()+'iframe_history.html')+"'></iframe>");
+	}
+}catch(e){/* squelch */}
+
+/* NOTES:
+ *  Safari 1.2: 
+ *	back button "works" fine, however it's not possible to actually
+ *	DETECT that you've moved backwards by inspecting window.location.
+ *	Unless there is some other means of locating.
+ *	FIXME: perhaps we can poll on history.length?
+ *  Safari 2.0.3+ (and probably 1.3.2+):
+ *	works fine, except when changeUrl is used. When changeUrl is used,
+ *	Safari jumps all the way back to whatever page was shown before
+ *	the page that uses dojo.undo.browser support.
+ *  IE 5.5 SP2:
+ *	back button behavior is macro. It does not move back to the
+ *	previous hash value, but to the last full page load. This suggests
+ *	that the iframe is the correct way to capture the back button in
+ *	these cases.
+ *	Don't test this page using local disk for MSIE. MSIE will not create 
+ *	a history list for iframe_history.html if served from a file: URL. 
+ *	The XML served back from the XHR tests will also not be properly 
+ *	created if served from local disk. Serve the test pages from a web 
+ *	server to test in that browser.
+ *  IE 6.0:
+ *	same behavior as IE 5.5 SP2
+ * Firefox 1.0:
+ *	the back button will return us to the previous hash on the same
+ *	page, thereby not requiring an iframe hack, although we do then
+ *	need to run a timer to detect inter-page movement.
+ */
+dojo.undo.browser = {
+	initialHref: window.location.href,
+	initialHash: window.location.hash,
+
+	moveForward: false,
+	historyStack: [],
+	forwardStack: [],
+	historyIframe: null,
+	bookmarkAnchor: null,
+	locationTimer: null,
+
+	/**
+	 * setInitialState sets the state object and back callback for the very first page that is loaded.
+	 * It is recommended that you call this method as part of an event listener that is registered via
+	 * dojo.addOnLoad().
+	 */
+	setInitialState: function(args){
+		this.initialState = {"url": this.initialHref, "kwArgs": args, "urlHash": this.initialHash};
+	},
+
+	//FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things.
+	//FIXME: is there a slight race condition in moz using change URL with the timer check and when
+	//       the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent.
+	/**
+	 * addToHistory takes one argument, and it is an object that defines the following functions:
+	 * - To support getting back button notifications, the object argument should implement a
+	 *   function called either "back", "backButton", or "handle". The string "back" will be
+	 *   passed as the first and only argument to this callback.
+	 * - To support getting forward button notifications, the object argument should implement a
+	 *   function called either "forward", "forwardButton", or "handle". The string "forward" will be
+	 *   passed as the first and only argument to this callback.
+	 * - If you want the browser location string to change, define "changeUrl" on the object. If the
+	 *   value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment
+	 *   identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does
+	 *   not evaluate to false, that value will be used as the fragment identifier. For example,
+	 *   if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1
+	 *   
+	 * Full example:
+	 * 
+	 * dojo.undo.browser.addToHistory({
+	 *   back: function() { alert('back pressed'); },
+	 *   forward: function() { alert('forward pressed'); },
+	 *   changeUrl: true
+	 * });
+	 */
+	addToHistory: function(args){
+		var hash = null;
+		if(!this.historyIframe){
+			this.historyIframe = window.frames["djhistory"];
+		}
+		if(!this.bookmarkAnchor){
+			this.bookmarkAnchor = document.createElement("a");
+			(document.body||document.getElementsByTagName("body")[0]).appendChild(this.bookmarkAnchor);
+			this.bookmarkAnchor.style.display = "none";
+		}
+		if((!args["changeUrl"])||(dojo.render.html.ie)){
+			var url = dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
+			this.moveForward = true;
+			dojo.io.setIFrameSrc(this.historyIframe, url, false);
+		}
+		if(args["changeUrl"]){
+			this.changingUrl = true;
+			hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime());
+			setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1);
+			this.bookmarkAnchor.href = hash;
+			
+			if(dojo.render.html.ie){
+				var oldCB = args["back"]||args["backButton"]||args["handle"];
+
+				//The function takes handleName as a parameter, in case the
+				//callback we are overriding was "handle". In that case,
+				//we will need to pass the handle name to handle.
+				var tcb = function(handleName){
+					if(window.location.hash != ""){
+						setTimeout("window.location.href = '"+hash+"';", 1);
+					}
+					//Use apply to set "this" to args, and to try to avoid memory leaks.
+					oldCB.apply(this, [handleName]);
+				}
+		
+				//Set interceptor function in the right place.
+				if(args["back"]){
+					args.back = tcb;
+				}else if(args["backButton"]){
+					args.backButton = tcb;
+				}else if(args["handle"]){
+					args.handle = tcb;
+				}
+		
+				//If addToHistory is called, then that means we prune the
+				//forward stack -- the user went back, then wanted to
+				//start a new forward path.
+				this.forwardStack = []; 
+				var oldFW = args["forward"]||args["forwardButton"]||args["handle"];
+		
+				//The function takes handleName as a parameter, in case the
+				//callback we are overriding was "handle". In that case,
+				//we will need to pass the handle name to handle.
+				var tfw = function(handleName){
+					if(window.location.hash != ""){
+						window.location.href = hash;
+					}
+					if(oldFW){ // we might not actually have one
+						//Use apply to set "this" to args, and to try to avoid memory leaks.
+						oldFW.apply(this, [handleName]);
+					}
+				}
+
+				//Set interceptor function in the right place.
+				if(args["forward"]){
+					args.forward = tfw;
+				}else if(args["forwardButton"]){
+					args.forwardButton = tfw;
+				}else if(args["handle"]){
+					args.handle = tfw;
+				}
+
+			}else if(dojo.render.html.moz){
+				// start the timer
+				if(!this.locationTimer){
+					this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200);
+				}
+			}
+		}
+
+		this.historyStack.push({"url": url, "kwArgs": args, "urlHash": hash});
+	},
+
+	checkLocation: function(){
+		if (!this.changingUrl){
+			var hsl = this.historyStack.length;
+
+			if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){
+				// FIXME: could this ever be a forward button?
+				// we can't clear it because we still need to check for forwards. Ugg.
+				// clearInterval(this.locationTimer);
+				this.handleBackButton();
+				return;
+			}
+			// first check to see if we could have gone forward. We always halt on
+			// a no-hash item.
+			if(this.forwardStack.length > 0){
+				if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){
+					this.handleForwardButton();
+					return;
+				}
+			}
+	
+			// ok, that didn't work, try someplace back in the history stack
+			if((hsl >= 2)&&(this.historyStack[hsl-2])){
+				if(this.historyStack[hsl-2].urlHash==window.location.hash){
+					this.handleBackButton();
+					return;
+				}
+			}
+		}
+	},
+
+	iframeLoaded: function(evt, ifrLoc){
+		var query = this._getUrlQuery(ifrLoc.href);
+		if(query == null){ 
+			// alert("iframeLoaded");
+			// we hit the end of the history, so we should go back
+			if(this.historyStack.length == 1){
+				this.handleBackButton();
+			}
+			return;
+		}
+		if(this.moveForward){
+			// we were expecting it, so it's not either a forward or backward movement
+			this.moveForward = false;
+			return;
+		}
+
+		//Check the back stack first, since it is more likely.
+		//Note that only one step back or forward is supported.
+		if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
+			this.handleBackButton();
+		}
+		else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
+			this.handleForwardButton();
+		}
+	},
+
+	handleBackButton: function(){
+		//The "current" page is always at the top of the history stack.
+		var current = this.historyStack.pop();
+		if(!current){ return; }
+		var last = this.historyStack[this.historyStack.length-1];
+		if(!last && this.historyStack.length == 0){
+			last = this.initialState;
+		}
+		if (last){
+			if(last.kwArgs["back"]){
+				last.kwArgs["back"]();
+			}else if(last.kwArgs["backButton"]){
+				last.kwArgs["backButton"]();
+			}else if(last.kwArgs["handle"]){
+				last.kwArgs.handle("back");
+			}
+		}
+		this.forwardStack.push(current);
+	},
+
+	handleForwardButton: function(){
+		var last = this.forwardStack.pop();
+		if(!last){ return; }
+		if(last.kwArgs["forward"]){
+			last.kwArgs.forward();
+		}else if(last.kwArgs["forwardButton"]){
+			last.kwArgs.forwardButton();
+		}else if(last.kwArgs["handle"]){
+			last.kwArgs.handle("forward");
+		}
+		this.historyStack.push(last);
+	},
+
+	_getUrlQuery: function(url){
+		var segments = url.split("?");
+		if (segments.length < 2){
+			return null;
+		}
+		else{
+			return segments[1];
+		}
+	}
+}

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/undo/browser.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uri/Uri.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uri/Uri.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uri/Uri.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uri/Uri.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,84 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uri.Uri");
+
+dojo.uri = new function() {
+	this.joinPath = function() {
+		// DEPRECATED: use the dojo.uri.Uri object instead
+		var arr = [];
+		for(var i = 0; i < arguments.length; i++) { arr.push(arguments[i]); }
+		return arr.join("/").replace(/\/{2,}/g, "/").replace(/((https*|ftps*):)/i, "$1/");
+	}
+	
+	this.dojoUri = function (uri) {
+		// returns a Uri object resolved relative to the dojo root
+		return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri);
+	}
+		
+	this.Uri = function (/*uri1, uri2, [...]*/) {
+		// An object representing a Uri.
+		// Each argument is evaluated in order relative to the next until
+		// a conanical uri is producued. To get an absolute Uri relative
+		// to the current document use
+		//      new dojo.uri.Uri(document.baseURI, uri)
+
+		// TODO: support for IPv6, see RFC 2732
+
+		// resolve uri components relative to each other
+		var uri = arguments[0];
+		for (var i = 1; i < arguments.length; i++) {
+			if(!arguments[i]) { continue; }
+
+			// Safari doesn't support this.constructor so we have to be explicit
+			var relobj = new dojo.uri.Uri(arguments[i].toString());
+			var uriobj = new dojo.uri.Uri(uri.toString());
+			
+			if (relobj.path == "" && relobj.scheme == null &&
+				relobj.authority == null && relobj.query == null) {
+				if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; }
+				relobj = uriobj;
+			}
+			
+			if (relobj.scheme != null && relobj.authority != null)
+				uri = "";
+			if (relobj.scheme != null) { uri += relobj.scheme + ":"; }
+			if (relobj.authority != null) { uri += "//" + relobj.authority; }
+			uri += relobj.path;
+			if (relobj.query != null) { uri += "?" + relobj.query; }
+			if (relobj.fragment != null) { uri += "#" + relobj.fragment; }
+		}
+		
+		this.uri = uri.toString();
+
+		// break the uri into its main components
+		var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
+	    var r = this.uri.match(new RegExp(regexp));
+
+		this.scheme = r[2] || (r[1] ? "" : null);
+		this.authority = r[4] || (r[3] ? "" : null);
+		this.path = r[5]; // can never be undefined
+		this.query = r[7] || (r[6] ? "" : null);
+		this.fragment  = r[9] || (r[8] ? "" : null);
+		
+		if (this.authority != null) {
+			// server based naming authority
+			regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
+			r = this.authority.match(new RegExp(regexp));
+			
+			this.user = r[3] || null;
+			this.password = r[4] || null;
+			this.host = r[5];
+			this.port = r[7] || null;
+		}
+	
+		this.toString = function(){ return this.uri; }
+	}
+};

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uri/Uri.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/LightweightGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/LightweightGenerator.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/LightweightGenerator.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/LightweightGenerator.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,82 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.LightweightGenerator");
+
+/**
+ * The LightweightGenerator is intended to be small and fast,
+ * but not necessarily good.
+ * 
+ * Small: The LightweightGenerator has a small footprint. 
+ * Once comments are stripped, it's only about 25 lines of 
+ * code, and it doesn't dojo.require() any other packages.
+ *
+ * Fast: The LightweightGenerator can generate lots of new 
+ * UUIDs fairly quickly (at least, more quickly than the other 
+ * dojo UUID generators).
+ *
+ * Not necessarily good: We use Math.random() as our source
+ * of randomness, which may or may not provide much randomness. 
+ */
+dojo.uuid.LightweightGenerator = new function() {
+
+	var HEX_RADIX = 16;
+
+// --------------------------------------------------
+// Private functions
+// --------------------------------------------------
+	function _generateRandomEightCharacterHexString() {
+		// Make random32bitNumber be a randomly generated floating point number
+		// between 0 and (4,294,967,296 - 1), inclusive.
+		var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );
+		var eightCharacterHexString = random32bitNumber.toString(HEX_RADIX);
+		while (eightCharacterHexString.length < 8) {
+			eightCharacterHexString = "0" + eightCharacterHexString;
+		}
+		return eightCharacterHexString; // for example: "3B12F1DF"
+	}
+
+// --------------------------------------------------
+// Public functions
+// --------------------------------------------------
+
+/**
+ * This function generates random UUIDs, meaning "version 4" UUIDs.
+ * For example, a typical generated value would be something like
+ * "3b12f1df-5232-4804-897e-917bf397618a".
+ *
+ * Examples:
+ * <pre>
+ *   var string = dojo.uuid.LightweightGenerator.generate();
+ *   var string = dojo.uuid.LightweightGenerator.generate(String);
+ *   var uuid   = dojo.uuid.LightweightGenerator.generate(dojo.uuid.Uuid);
+ * </pre>
+ *
+ * @param	returnType	Optional. The type of instance to return.
+ * @return	A newly generated version 4 UUID.
+ */
+	this.generate = function(returnType) {
+		var hyphen = "-";
+		var versionCodeForRandomlyGeneratedUuids = "4"; // 8 == binary2hex("0100")
+		var variantCodeForDCEUuids = "8"; // 8 == binary2hex("1000")
+		var a = _generateRandomEightCharacterHexString();
+		var b = _generateRandomEightCharacterHexString();
+		b = b.substring(0, 4) + hyphen + versionCodeForRandomlyGeneratedUuids + b.substring(5, 8);
+		var c = _generateRandomEightCharacterHexString();
+		c = variantCodeForDCEUuids + c.substring(1, 4) + hyphen + c.substring(4, 8);
+		var d = _generateRandomEightCharacterHexString();
+		var returnValue = a + hyphen + b + hyphen + c + d;
+		returnValue = returnValue.toLowerCase();
+		if (returnType && (returnType != String)) {
+			returnValue = new returnType(returnValue);
+		}
+		return returnValue;
+	};
+}();

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/LightweightGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NameBasedGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NameBasedGenerator.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NameBasedGenerator.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NameBasedGenerator.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,43 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.NameBasedGenerator");
+
+dojo.uuid.NameBasedGenerator = new function() {
+
+/**
+ * This function generates name-based UUIDs, meaning "version 3" 
+ * and "version 5" UUIDs.
+ *
+ * Examples:
+ * <pre>
+ *   var string = dojo.uuid.NameBasedGenerator.generate();
+ *   var string = dojo.uuid.NameBasedGenerator.generate(String);
+ *   var uuid   = dojo.uuid.NameBasedGenerator.generate(dojo.uuid.Uuid);
+ * </pre>
+ *
+ * @param	returnType	Optional. The type of instance to return.
+ * @return	A newly generated version 3 or version 5 UUID.
+ */
+	this.generate = function(returnType) {
+		dojo.unimplemented('dojo.uuid.NameBasedGenerator.generate');
+		
+		// FIXME:
+		// For an algorithm to generate name-based UUIDs, 
+		// see sections 4.3 of RFC 4122:
+		//  http://www.ietf.org/rfc/rfc4122.txt
+		
+		var returnValue = "00000000-0000-0000-0000-000000000000"; // FIXME
+		if (returnType && (returnType != String)) {
+			returnValue = new returnType(returnValue);
+		}
+		return returnValue;
+	};
+}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NameBasedGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NilGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NilGenerator.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NilGenerator.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NilGenerator.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,38 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.NilGenerator");
+
+dojo.uuid.NilGenerator = new function() {
+
+/**
+ * This function returns the Nil UUID: 
+ * "00000000-0000-0000-0000-000000000000".
+ * The Nil UUID is described in section 4.1.7 of
+ * RFC 4122: http://www.ietf.org/rfc/rfc4122.txt
+ *
+ * Examples:
+ * <pre>
+ *   var string = dojo.uuid.NilGenerator.generate();
+ *   var string = dojo.uuid.NilGenerator.generate(String);
+ *   var uuid   = dojo.uuid.NilGenerator.generate(dojo.uuid.Uuid);
+ * </pre>
+ *
+ * @param	returnType	Optional. The type of instance to return.
+ * @return	The nil UUID.
+ */
+	this.generate = function(returnType) {
+		var returnValue = "00000000-0000-0000-0000-000000000000";
+		if (returnType && (returnType != String)) {
+			returnValue = new returnType(returnValue);
+		}
+		return returnValue;
+	};
+}();

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/NilGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/RandomGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/RandomGenerator.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/RandomGenerator.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/RandomGenerator.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,44 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.RandomGenerator");
+
+dojo.uuid.RandomGenerator = new function() {
+
+/**
+ * This function generates random UUIDs, meaning "version 4" UUIDs.
+ * For example, a typical generated value would be something like
+ * "3b12f1df-5232-4804-897e-917bf397618a".
+ *
+ * Examples:
+ * <pre>
+ *   var string = dojo.uuid.RandomGenerator.generate();
+ *   var string = dojo.uuid.RandomGenerator.generate(String);
+ *   var uuid   = dojo.uuid.RandomGenerator.generate(dojo.uuid.Uuid);
+ * </pre>
+ *
+ * @param	returnType	Optional. The type of instance to return.
+ * @return	A newly generated version 4 UUID.
+ */
+	this.generate = function(returnType) {
+		dojo.unimplemented('dojo.uuid.RandomGenerator.generate');
+		
+		// FIXME:
+		// For an algorithm to generate a random UUID, see
+		// sections 4.4 and 4.5 of RFC 4122:
+		//  http://www.ietf.org/rfc/rfc4122.txt
+		
+		var returnValue = "00000000-0000-0000-0000-000000000000"; // FIXME
+		if (returnType && (returnType != String)) {
+			returnValue = new returnType(returnValue);
+		}
+		return returnValue;
+	};
+}();

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/RandomGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/TimeBasedGenerator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/TimeBasedGenerator.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/TimeBasedGenerator.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/TimeBasedGenerator.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,391 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.TimeBasedGenerator");
+dojo.require("dojo.lang.*");
+
+dojo.uuid.TimeBasedGenerator = new function() {
+
+// --------------------------------------------------
+// Public constants
+// --------------------------------------------------
+	// Number of hours between October 15, 1582 and January 1, 1970:
+	this.GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;
+	
+	// Number of seconds between October 15, 1582 and January 1, 1970:
+	//   this.GREGORIAN_CHANGE_OFFSET_IN_SECONDS = 12219292800;	
+	
+// --------------------------------------------------
+// Private variables
+// --------------------------------------------------
+	var _uuidPseudoNodeString = null;
+	var _uuidClockSeqString = null;
+	var _dateValueOfPreviousUuid = null;
+	var _nextIntraMillisecondIncrement = 0;
+	var _cachedMillisecondsBetween1582and1970 = null;
+	var _cachedHundredNanosecondIntervalsPerMillisecond = null;
+	var _uniformNode = null;
+	var HEX_RADIX = 16;
+
+// --------------------------------------------------
+// Private functions
+// --------------------------------------------------
+
+/**
+ * Given an array which holds a 64-bit number broken into 4 16-bit elements,
+ * this method carries any excess bits (greater than 16-bits) from each array
+ * element into the next.
+ *
+ * @param	arrayA	An array with 4 elements, each of which is a 16-bit number.
+ */
+	function _carry(arrayA) {
+		arrayA[2] += arrayA[3] >>> 16;
+		arrayA[3] &= 0xFFFF;
+		arrayA[1] += arrayA[2] >>> 16;
+		arrayA[2] &= 0xFFFF;
+		arrayA[0] += arrayA[1] >>> 16;
+		arrayA[1] &= 0xFFFF;
+		dojo.lang.assert((arrayA[0] >>> 16) === 0);
+	}
+
+/**
+ * Given a floating point number, this method returns an array which holds a
+ * 64-bit number broken into 4 16-bit elements.
+ *
+ * @param	x	A floating point number.
+ * @return   An array with 4 elements, each of which is a 16-bit number.
+ */
+	function _get64bitArrayFromFloat(x) {
+		var result = new Array(0, 0, 0, 0);
+		result[3] = x % 0x10000;
+		x -= result[3];
+		x /= 0x10000;
+		result[2] = x % 0x10000;
+		x -= result[2];
+		x /= 0x10000;
+		result[1] = x % 0x10000;
+		x -= result[1];
+		x /= 0x10000;
+		result[0] = x;
+		return result;
+	}
+
+/**
+ * Takes two arrays, each of which holds a 64-bit number broken into 4
+ * 16-bit elements, and returns a new array that holds a 64-bit number
+ * that is the sum of the two original numbers.
+ *
+ * @param	arrayA	An array with 4 elements, each of which is a 16-bit number.
+ * @param	arrayB	An array with 4 elements, each of which is a 16-bit number.
+ * @return   An array with 4 elements, each of which is a 16-bit number.
+ */
+	function _addTwo64bitArrays(arrayA, arrayB) {
+		dojo.lang.assertType(arrayA, Array);
+		dojo.lang.assertType(arrayB, Array);
+		dojo.lang.assert(arrayA.length == 4);
+		dojo.lang.assert(arrayB.length == 4);
+	
+		var result = new Array(0, 0, 0, 0);
+		result[3] = arrayA[3] + arrayB[3];
+		result[2] = arrayA[2] + arrayB[2];
+		result[1] = arrayA[1] + arrayB[1];
+		result[0] = arrayA[0] + arrayB[0];
+		_carry(result);
+		return result;
+	}
+
+/**
+ * Takes two arrays, each of which holds a 64-bit number broken into 4
+ * 16-bit elements, and returns a new array that holds a 64-bit number
+ * that is the product of the two original numbers.
+ *
+ * @param	arrayA	An array with 4 elements, each of which is a 16-bit number.
+ * @param	arrayB	An array with 4 elements, each of which is a 16-bit number.
+ * @return   An array with 4 elements, each of which is a 16-bit number.
+ */
+	function _multiplyTwo64bitArrays(arrayA, arrayB) {
+		dojo.lang.assertType(arrayA, Array);
+		dojo.lang.assertType(arrayB, Array);
+		dojo.lang.assert(arrayA.length == 4);
+		dojo.lang.assert(arrayB.length == 4);
+	
+		var overflow = false;
+		if (arrayA[0] * arrayB[0] !== 0) { overflow = true; }
+		if (arrayA[0] * arrayB[1] !== 0) { overflow = true; }
+		if (arrayA[0] * arrayB[2] !== 0) { overflow = true; }
+		if (arrayA[1] * arrayB[0] !== 0) { overflow = true; }
+		if (arrayA[1] * arrayB[1] !== 0) { overflow = true; }
+		if (arrayA[2] * arrayB[0] !== 0) { overflow = true; }
+		dojo.lang.assert(!overflow);
+	
+		var result = new Array(0, 0, 0, 0);
+		result[0] += arrayA[0] * arrayB[3];
+		_carry(result);
+		result[0] += arrayA[1] * arrayB[2];
+		_carry(result);
+		result[0] += arrayA[2] * arrayB[1];
+		_carry(result);
+		result[0] += arrayA[3] * arrayB[0];
+		_carry(result);
+		result[1] += arrayA[1] * arrayB[3];
+		_carry(result);
+		result[1] += arrayA[2] * arrayB[2];
+		_carry(result);
+		result[1] += arrayA[3] * arrayB[1];
+		_carry(result);
+		result[2] += arrayA[2] * arrayB[3];
+		_carry(result);
+		result[2] += arrayA[3] * arrayB[2];
+		_carry(result);
+		result[3] += arrayA[3] * arrayB[3];
+		_carry(result);
+		return result;
+	}
+
+/**
+ * Pads a string with leading zeros and returns the result.
+ * For example:
+ * <pre>
+ *   result = _padWithLeadingZeros("abc", 6);
+ *   dojo.lang.assert(result == "000abc");
+ * </pre>
+ *
+ * @param	string	A string to add padding to.
+ * @param	desiredLength	The number of characters the return string should have.
+ * @return   A string.
+ */
+	function _padWithLeadingZeros(string, desiredLength) {
+		while (string.length < desiredLength) {
+			string = "0" + string;
+		}
+		return string;
+	}
+
+/**
+ * Returns a randomly generated 8-character string of hex digits.
+ *
+ * @return   An 8-character hex string.
+ */
+	function _generateRandomEightCharacterHexString() {
+		// FIXME: This probably isn't a very high quality random number.
+	
+		// Make random32bitNumber be a randomly generated floating point number
+		// between 0 and (4,294,967,296 - 1), inclusive.
+		var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );
+	
+		var eightCharacterString = random32bitNumber.toString(HEX_RADIX);
+		while (eightCharacterString.length < 8) {
+			eightCharacterString = "0" + eightCharacterString;
+		}
+		return eightCharacterString;
+	}
+
+/**
+ * Generates a time-based UUID, meaning a version 1 UUID.  JavaScript
+ * code running in a browser doesn't have access to the IEEE 802.3 address
+ * of the computer, so if a node value isn't supplied, we generate a random 
+ * pseudonode value instead.
+ *
+ * @param	node	Optional. A 12-character string to use as the node in the new UUID.
+ * @return   Returns a 36 character string, which will look something like "b4308fb0-86cd-11da-a72b-0800200c9a66".
+ */
+	function _generateUuidString(node) {
+		dojo.lang.assertType(node, [String, "optional"]);
+		if (node) {
+			dojo.lang.assert(node.length == 12);
+		} else {
+			if (_uniformNode) {
+				node = _uniformNode;
+			} else {
+				if (!_uuidPseudoNodeString) {
+					var pseudoNodeIndicatorBit = 0x8000;
+					var random15bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 15) );
+					var leftmost4HexCharacters = (pseudoNodeIndicatorBit | random15bitNumber).toString(HEX_RADIX);
+					_uuidPseudoNodeString = leftmost4HexCharacters + _generateRandomEightCharacterHexString();
+				}
+				node = _uuidPseudoNodeString;
+			}
+		}
+		if (!_uuidClockSeqString) {
+			var variantCodeForDCEUuids = 0x8000; // 10--------------, i.e. uses only first two of 16 bits.
+			var random14bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 14) );
+			_uuidClockSeqString = (variantCodeForDCEUuids | random14bitNumber).toString(HEX_RADIX);
+		}
+	
+		// Maybe we should think about trying to make the code more readable to
+		// newcomers by creating a class called "WholeNumber" that encapsulates
+		// the methods and data structures for working with these arrays that
+		// hold 4 16-bit numbers?  And then these variables below have names
+		// like "wholeSecondsPerHour" rather than "arraySecondsPerHour"?
+		var now = new Date();
+		var millisecondsSince1970 = now.valueOf(); // milliseconds since midnight 01 January, 1970 UTC.
+		var nowArray = _get64bitArrayFromFloat(millisecondsSince1970);
+		if (!_cachedMillisecondsBetween1582and1970) {
+			var arraySecondsPerHour = _get64bitArrayFromFloat(60 * 60);
+			var arrayHoursBetween1582and1970 = _get64bitArrayFromFloat(dojo.uuid.TimeBasedGenerator.GREGORIAN_CHANGE_OFFSET_IN_HOURS);
+			var arraySecondsBetween1582and1970 = _multiplyTwo64bitArrays(arrayHoursBetween1582and1970, arraySecondsPerHour);
+			var arrayMillisecondsPerSecond = _get64bitArrayFromFloat(1000);
+			_cachedMillisecondsBetween1582and1970 = _multiplyTwo64bitArrays(arraySecondsBetween1582and1970, arrayMillisecondsPerSecond);
+			_cachedHundredNanosecondIntervalsPerMillisecond = _get64bitArrayFromFloat(10000);
+		}
+		var arrayMillisecondsSince1970 = nowArray;
+		var arrayMillisecondsSince1582 = _addTwo64bitArrays(_cachedMillisecondsBetween1582and1970, arrayMillisecondsSince1970);
+		var arrayHundredNanosecondIntervalsSince1582 = _multiplyTwo64bitArrays(arrayMillisecondsSince1582, _cachedHundredNanosecondIntervalsPerMillisecond);
+	
+		if (now.valueOf() == _dateValueOfPreviousUuid) {
+			arrayHundredNanosecondIntervalsSince1582[3] += _nextIntraMillisecondIncrement;
+			_carry(arrayHundredNanosecondIntervalsSince1582);
+			_nextIntraMillisecondIncrement += 1;
+			if (_nextIntraMillisecondIncrement == 10000) {
+				// If we've gotten to here, it means we've already generated 10,000
+				// UUIDs in this single millisecond, which is the most that the UUID
+				// timestamp field allows for.  So now we'll just sit here and wait
+				// for a fraction of a millisecond, so as to ensure that the next
+				// time this method is called there will be a different millisecond
+				// value in the timestamp field.
+				while (now.valueOf() == _dateValueOfPreviousUuid) {
+					now = new Date();
+				}
+			}
+		} else {
+			_dateValueOfPreviousUuid = now.valueOf();
+			_nextIntraMillisecondIncrement = 1;
+		}
+	
+		var hexTimeLowLeftHalf  = arrayHundredNanosecondIntervalsSince1582[2].toString(HEX_RADIX);
+		var hexTimeLowRightHalf = arrayHundredNanosecondIntervalsSince1582[3].toString(HEX_RADIX);
+		var hexTimeLow = _padWithLeadingZeros(hexTimeLowLeftHalf, 4) + _padWithLeadingZeros(hexTimeLowRightHalf, 4);
+		var hexTimeMid = arrayHundredNanosecondIntervalsSince1582[1].toString(HEX_RADIX);
+		hexTimeMid = _padWithLeadingZeros(hexTimeMid, 4);
+		var hexTimeHigh = arrayHundredNanosecondIntervalsSince1582[0].toString(HEX_RADIX);
+		hexTimeHigh = _padWithLeadingZeros(hexTimeHigh, 3);
+		var hyphen = "-";
+		var versionCodeForTimeBasedUuids = "1"; // binary2hex("0001")
+		var resultUuid = hexTimeLow + hyphen + hexTimeMid + hyphen +
+					versionCodeForTimeBasedUuids + hexTimeHigh + hyphen +
+					_uuidClockSeqString + hyphen + node;
+		resultUuid = resultUuid.toLowerCase();
+		return resultUuid;
+	}
+
+// --------------------------------------------------
+// Public functions
+// --------------------------------------------------
+
+/**
+ * Sets the 'node' value that will be included in generated UUIDs.
+ *
+ * @param	node	A 12-character hex string representing a pseudoNode or hardwareNode.
+ */
+	this.setNode = function(node) {
+		dojo.lang.assert((node === null) || (node.length == 12));
+		_uniformNode = node;
+	};
+
+/**
+ * Returns the 'node' value that will be included in generated UUIDs.
+ *
+ * @return	A 12-character hex string representing a pseudoNode or hardwareNode.
+ */
+	this.getNode = function() {
+		return _uniformNode;
+	};
+
+/**
+ * This function generates time-based UUIDs, meaning "version 1" UUIDs.
+ *
+ * For more info, see
+ *   http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt
+ *   http://www.infonuovo.com/dma/csdocs/sketch/instidid.htm
+ *   http://kruithof.xs4all.nl/uuid/uuidgen
+ *   http://www.opengroup.org/onlinepubs/009629399/apdxa.htm#tagcjh_20
+ *   http://jakarta.apache.org/commons/sandbox/id/apidocs/org/apache/commons/id/uuid/clock/Clock.html
+ *
+ * Examples:
+ * <pre>
+ *   var generate = dojo.uuid.TimeBasedGenerator.generate;
+ *   var uuid;   // an instance of dojo.uuid.Uuid
+ *   var string; // a simple string literal
+ *   string = generate();
+ *   string = generate(String);
+ *   uuid   = generate(dojo.uuid.Uuid);
+ *   string = generate("017bf397618a");
+ *   string = generate({node: "017bf397618a"});         // hardwareNode
+ *   string = generate({node: "f17bf397618a"});         // pseudoNode
+ *   string = generate({hardwareNode: "017bf397618a"});
+ *   string = generate({pseudoNode:   "f17bf397618a"});
+ *   string = generate({node: "017bf397618a", returnType: String});
+ *   uuid   = generate({node: "017bf397618a", returnType: dojo.uuid.Uuid});
+ *   dojo.uuid.TimeBasedGenerator.setNode("017bf397618a");
+ *   string = generate(); // the generated UUID has node == "017bf397618a"
+ *   uuid   = generate(dojo.uuid.Uuid); // the generated UUID has node == "017bf397618a"
+ * </pre>
+ *
+ * @param	class	The type of instance to return.
+ * @param	node	A 12-character hex string representing a pseudoNode or hardwareNode.
+ * @namedParam	node	A 12-character hex string representing a pseudoNode or hardwareNode.
+ * @namedParam	hardwareNode	A 12-character hex string containing an IEEE 802.3 network node identificator.
+ * @namedParam	pseudoNode	A 12-character hex string representing a pseudoNode.
+ * @namedParam	returnType	The type of instance to return.
+ * @return	A newly generated version 1 UUID.
+ */
+	this.generate = function(input) {
+		var nodeString = null;
+		var returnType = null;
+		
+		if (input) {
+			if (dojo.lang.isObject(input) && !dojo.lang.isBuiltIn(input)) {
+				var namedParameters = input;
+				dojo.lang.assertValidKeywords(namedParameters, ["node", "hardwareNode", "pseudoNode", "returnType"]);
+				var node = namedParameters["node"];
+				var hardwareNode = namedParameters["hardwareNode"];
+				var pseudoNode = namedParameters["pseudoNode"];
+				nodeString = (node || pseudoNode || hardwareNode);
+				if (nodeString) {
+					var firstCharacter = nodeString.charAt(0);
+					var firstDigit = parseInt(firstCharacter, HEX_RADIX);
+					if (hardwareNode) {
+						dojo.lang.assert((firstDigit >= 0x0) && (firstDigit <= 0x7));
+					}
+					if (pseudoNode) {
+						dojo.lang.assert((firstDigit >= 0x8) && (firstDigit <= 0xF));
+					}
+				}
+				returnType = namedParameters["returnType"];
+				dojo.lang.assertType(returnType, [Function, "optional"]);
+			} else {
+				if (dojo.lang.isString(input)) {
+					nodeString = input;
+					returnType = null;
+				} else {
+					if (dojo.lang.isFunction(input)) {
+						nodeString = null;
+						returnType = input;
+					}
+				}
+			}
+			if (nodeString) {
+				dojo.lang.assert(nodeString.length == 12);
+				var integer = parseInt(nodeString, HEX_RADIX);
+				dojo.lang.assert(isFinite(integer));
+			}
+			dojo.lang.assertType(returnType, [Function, "optional"]);
+		}
+		
+		var uuidString = _generateUuidString(nodeString);
+		var returnValue;
+		if (returnType && (returnType != String)) {
+			returnValue = new returnType(uuidString);
+		} else {
+			returnValue = uuidString;
+		}
+		return returnValue;
+	};
+}();

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/TimeBasedGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/Uuid.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/Uuid.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/Uuid.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/Uuid.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,423 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.uuid.Uuid");
+dojo.require("dojo.lang.*");
+
+// -------------------------------------------------------------------
+// Constructor
+// -------------------------------------------------------------------
+/**
+ * The Uuid class offers methods for inspecting existing UUIDs.
+ *
+ * Examples:
+ * <pre>
+ *   var uuid;
+ *   uuid = new dojo.uuid.Uuid("3b12f1df-5232-4804-897e-917bf397618a");
+ *   uuid = new dojo.uuid.Uuid(); // "00000000-0000-0000-0000-000000000000"
+ *   uuid = new dojo.uuid.Uuid(dojo.uuid.RandomGenerator);
+ *   uuid = new dojo.uuid.Uuid(dojo.uuid.TimeBasedGenerator);
+ *
+ *   dojo.uuid.Uuid.setGenerator(dojo.uuid.RandomGenerator);
+ *   uuid = new dojo.uuid.Uuid();
+ *   dojo.lang.assert(!uuid.isEqual(dojo.uuid.Uuid.NIL_UUID));
+ * </pre>
+ *
+ * @scope	public instance constructor
+ * @param	uuidString	A 36-character string that conforms to the UUID spec.
+ * @param	generator	A UUID generator, such as dojo.uuid.TimeBasedGenerator.
+ */
+dojo.uuid.Uuid = function(input) {
+	this._uuidString = dojo.uuid.Uuid.NIL_UUID;
+	if (input) {
+		if (dojo.lang.isString(input)) {
+			this._uuidString = input.toLowerCase();
+			dojo.lang.assert(this.isValid());
+		} else {
+			if (dojo.lang.isObject(input) && input.generate) {
+				var generator = input;
+				this._uuidString = generator.generate();
+				dojo.lang.assert(this.isValid());
+			} else {
+				// we got passed something other than a string
+				dojo.lang.assert(false, "The dojo.uuid.Uuid() constructor must be initializated with a UUID string.");
+			}
+		}
+	} else {
+		var ourGenerator = dojo.uuid.Uuid.getGenerator();
+		if (ourGenerator) {
+			this._uuidString = ourGenerator.generate();
+			dojo.lang.assert(this.isValid());
+		}
+	}
+};
+
+// -------------------------------------------------------------------
+// Public constants
+// -------------------------------------------------------------------
+dojo.uuid.Uuid.NIL_UUID = "00000000-0000-0000-0000-000000000000";
+dojo.uuid.Uuid.Version = {
+	UNKNOWN: 0,
+	TIME_BASED: 1,
+	DCE_SECURITY: 2,
+	NAME_BASED_MD5: 3,
+	RANDOM: 4,
+	NAME_BASED_SHA1: 5 };
+dojo.uuid.Uuid.Variant = {
+	NCS: "0",
+	DCE: "10",
+	MICROSOFT: "110",
+	UNKNOWN: "111" };
+dojo.uuid.Uuid.HEX_RADIX = 16;
+
+// -------------------------------------------------------------------
+// Public class methods
+// -------------------------------------------------------------------
+/**
+ * Given two UUIDs to compare, this method returns 0, 1, or -1.
+ * This method is designed to be used by sorting routines, like
+ * the JavaScript built-in Array sort() method.
+ * This implementation is intended to match the sample 
+ * implementation in IETF RFC 4122: 
+ * http://www.ietf.org/rfc/rfc4122.txt
+ * 
+ * Example:
+ * <pre>
+ *   var generator = dojo.uuid.TimeBasedGenerator;
+ *   var a = new dojo.uuid.Uuid(generator);
+ *   var b = new dojo.uuid.Uuid(generator);
+ *   var c = new dojo.uuid.Uuid(generator);
+ *   var array = new Array(a, b, c);
+ *   array.sort(dojo.uuid.Uuid.compare);
+ * </pre>
+ *
+ * @param	uuidOne	A dojo.uuid.Uuid instance, or a string representing a UUID.
+ * @param	uuidTwo	A dojo.uuid.Uuid instance, or a string representing a UUID.
+ * @return   Returns either 0, 1, or -1.
+ */
+dojo.uuid.Uuid.compare = function(uuidOne, uuidTwo) {
+	var uuidStringOne = uuidOne.toString();
+	var uuidStringTwo = uuidTwo.toString();
+	if (uuidStringOne > uuidStringTwo) return 1;
+	if (uuidStringOne < uuidStringTwo) return -1;
+	return 0;
+};
+
+/**
+ * Sets the default generator, which will be used by the 
+ * "new dojo.uuid.Uuid()" constructor if no parameters
+ * are passed in.
+ *
+ * @param	generator	A UUID generator, such as dojo.uuid.TimeBasedGenerator.
+ * @return   Returns true or false. True if this UUID is equal to the otherUuid.
+ */
+dojo.uuid.Uuid.setGenerator = function(generator) {
+	dojo.lang.assert(!generator || (dojo.lang.isObject(generator) && generator.generate));
+	dojo.uuid.Uuid._ourGenerator = generator;
+};
+
+/**
+ * Returns the default generator.  See setGenerator().
+ *
+ * @return   A UUID generator, such as dojo.uuid.TimeBasedGenerator.
+ */
+dojo.uuid.Uuid.getGenerator = function(generator) {
+	return dojo.uuid.Uuid._ourGenerator;
+};
+
+// -------------------------------------------------------------------
+// Public instance methods
+// -------------------------------------------------------------------
+/**
+ * Returns a 36-character string representing the UUID, such 
+ * as "3b12f1df-5232-4804-897e-917bf397618a".
+ * 
+ * Examples:
+ * <pre>
+ *   var uuid = new dojo.uuid.Uuid(dojo.uuid.TimeBasedGenerator);
+ *   var s;
+ *   s = uuid.toString();       //  eb529fec-6498-11d7-b236-000629ba5445
+ *   s = uuid.toString('{}');   // {eb529fec-6498-11d7-b236-000629ba5445}
+ *   s = uuid.toString('()');   // (eb529fec-6498-11d7-b236-000629ba5445)
+ *   s = uuid.toString('""');   // "eb529fec-6498-11d7-b236-000629ba5445"
+ *   s = uuid.toString("''");   // 'eb529fec-6498-11d7-b236-000629ba5445'
+ *   s = uuid.toString('!-');   //  eb529fec649811d7b236000629ba5445
+ *   s = uuid.toString('urn');  //  urn:uuid:eb529fec-6498-11d7-b236-000629ba5445
+ * </pre>
+ *
+ * @param	uuidOne	A dojo.uuid.Uuid instance, or a string representing a UUID.
+ * @return   Returns a standard 36-character UUID string, or something similar. 
+ */
+dojo.uuid.Uuid.prototype.toString = function(format) {
+	if (format) {
+		switch (format) {
+			case '{}':
+				return '{' + this._uuidString + '}';
+				break;
+			case '()':
+				return '(' + this._uuidString + ')';
+				break;
+			case '""':
+				return '"' + this._uuidString + '"';
+				break;
+			case "''":
+				return "'" + this._uuidString + "'";
+				break;
+			case 'urn':
+				return 'urn:uuid:' + this._uuidString;
+				break;
+			case '!-':
+				return this._uuidString.split('-').join('');
+				break;
+			default:
+				// we got passed something other than what we expected
+				dojo.lang.assert(false, "The toString() method of dojo.uuid.Uuid was passed a bogus format.");
+		}
+	} else {
+		return this._uuidString;
+	}
+};
+
+/**
+ * Compares this UUID to another UUID, and returns 0, 1, or -1.
+ * This implementation is intended to match the sample 
+ * implementation in IETF RFC 4122: 
+ * http://www.ietf.org/rfc/rfc4122.txt
+ *
+ * @param	otherUuid	A dojo.uuid.Uuid instance, or a string representing a UUID.
+ * @return   Returns either 0, 1, or -1.
+ */
+dojo.uuid.Uuid.prototype.compare = function(otherUuid) {
+	return dojo.uuid.Uuid.compare(this, otherUuid);
+};
+
+/**
+ * Returns true if this UUID is equal to the otherUuid, or
+ * false otherwise.
+ *
+ * @param	otherUuid	A dojo.uuid.Uuid instance, or a string representing a UUID.
+ * @return   Returns true or false. True if this UUID is equal to the otherUuid.
+ */
+dojo.uuid.Uuid.prototype.isEqual = function(otherUuid) {
+	return (this.compare(otherUuid) == 0);
+};
+
+/**
+ * Returns true if the UUID was initialized with a valid value.
+ *
+ * @return   True if the UUID is valid, or false if it is not.
+ */
+dojo.uuid.Uuid.prototype.isValid = function() {
+	try {
+		dojo.lang.assertType(this._uuidString, String);
+		dojo.lang.assert(this._uuidString.length == 36);
+		dojo.lang.assert(this._uuidString == this._uuidString.toLowerCase());
+		var arrayOfParts = this._uuidString.split("-");
+		dojo.lang.assert(arrayOfParts.length == 5);
+		dojo.lang.assert(arrayOfParts[0].length == 8);
+		dojo.lang.assert(arrayOfParts[1].length == 4);
+		dojo.lang.assert(arrayOfParts[2].length == 4);
+		dojo.lang.assert(arrayOfParts[3].length == 4);
+		dojo.lang.assert(arrayOfParts[4].length == 12);
+		for (var i in arrayOfParts) {
+			var part = arrayOfParts[i];
+			var integer = parseInt(part, dojo.uuid.Uuid.HEX_RADIX);
+			dojo.lang.assert(isFinite(integer));
+		}
+		return true;
+	} catch (e) {
+		return false;
+	}
+};
+
+/**
+ * Returns a variant code that indicates what type of UUID this is.
+ * For example:
+ * <pre>
+ *   var uuid = new dojo.uuid.Uuid("3b12f1df-5232-4804-897e-917bf397618a");
+ *   var variant = uuid.getVariant();
+ *   dojo.lang.assert(variant == dojo.uuid.Uuid.Variant.DCE);
+ * </pre>
+ *
+ * @return   Returns one of the enumarted dojo.uuid.Uuid.Variant values.
+ */
+dojo.uuid.Uuid.prototype.getVariant = function() {
+	// "3b12f1df-5232-4804-897e-917bf397618a"
+	//                     ^
+	//                     |
+	//         (variant "10__" == DCE)
+	var variantCharacter = this._uuidString.charAt(19);
+	var variantNumber = parseInt(variantCharacter, dojo.uuid.Uuid.HEX_RADIX);
+	dojo.lang.assert((variantNumber >= 0) && (variantNumber <= 16));
+
+	if (!dojo.uuid.Uuid._ourVariantLookupTable) {
+		var Variant = dojo.uuid.Uuid.Variant;
+		var lookupTable = [];
+
+		lookupTable[0x0] = Variant.NCS;       // 0000
+		lookupTable[0x1] = Variant.NCS;       // 0001
+		lookupTable[0x2] = Variant.NCS;       // 0010
+		lookupTable[0x3] = Variant.NCS;       // 0011
+
+		lookupTable[0x4] = Variant.NCS;       // 0100
+		lookupTable[0x5] = Variant.NCS;       // 0101
+		lookupTable[0x6] = Variant.NCS;       // 0110
+		lookupTable[0x7] = Variant.NCS;       // 0111
+
+		lookupTable[0x8] = Variant.DCE;       // 1000
+		lookupTable[0x9] = Variant.DCE;       // 1001
+		lookupTable[0xA] = Variant.DCE;       // 1010
+		lookupTable[0xB] = Variant.DCE;       // 1011
+
+		lookupTable[0xC] = Variant.MICROSOFT; // 1100
+		lookupTable[0xD] = Variant.MICROSOFT; // 1101
+		lookupTable[0xE] = Variant.UNKNOWN;   // 1110
+		lookupTable[0xF] = Variant.UNKNOWN;   // 1111
+		
+		dojo.uuid.Uuid._ourVariantLookupTable = lookupTable;
+	}
+
+	return dojo.uuid.Uuid._ourVariantLookupTable[variantNumber];
+};
+
+/**
+ * Returns a version number that indicates what type of UUID this is.
+ * For example:
+ * <pre>
+ *   var uuid = new dojo.uuid.Uuid("b4308fb0-86cd-11da-a72b-0800200c9a66");
+ *   var version = uuid.getVersion();
+ *   dojo.lang.assert(version == dojo.uuid.Uuid.Version.TIME_BASED);
+ * </pre>
+ *
+ * @return   Returns one of the enumerated dojo.uuid.Uuid.Version values.
+ * @throws   Throws an Error if this is not a DCE Variant UUID.
+ */
+dojo.uuid.Uuid.prototype.getVersion = function() {
+	if (!this._versionNumber) {
+		var errorMessage = "Called getVersion() on a dojo.uuid.Uuid that was not a DCE Variant UUID.";
+		dojo.lang.assert(this.getVariant() == dojo.uuid.Uuid.Variant.DCE, errorMessage);
+	
+		// "b4308fb0-86cd-11da-a72b-0800200c9a66"
+		//                ^
+		//                |
+		//       (version 1 == TIME_BASED)
+		var versionCharacter = this._uuidString.charAt(14);
+		this._versionNumber = parseInt(versionCharacter, dojo.uuid.Uuid.HEX_RADIX);
+	}
+	return this._versionNumber;
+};
+
+/**
+ * If this is a version 1 UUID (a time-based UUID), this method returns a 
+ * 12-character string with the "node" or "pseudonode" portion of the UUID, 
+ * which is the rightmost 12 characters.  
+ * Throws an Error if this is not a version 1 UUID.
+ *
+ * @return   Returns a 12-character string, which will look something like "917bf397618a".
+ * @throws   Throws an Error if this is not a version 1 UUID.
+ */
+dojo.uuid.Uuid.prototype.getNode = function() {
+	if (!this._nodeString) {
+		var errorMessage = "Called getNode() on a dojo.uuid.Uuid that was not a TIME_BASED UUID.";
+		dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage);
+
+		var arrayOfStrings = this._uuidString.split('-');
+		this._nodeString = arrayOfStrings[4];
+	}
+	return this._nodeString;
+};
+
+/**
+ * If this is a version 1 UUID (a time-based UUID), this method returns 
+ * the timestamp value encoded in the UUID.  The caller can ask for the
+ * timestamp to be returned either as a JavaScript Date object or as a 
+ * 15-character string of hex digits.
+ * Throws an Error if this is not a version 1 UUID.
+ *
+ * Examples:
+ * <pre>
+ *   var uuid = new dojo.uuid.Uuid("b4308fb0-86cd-11da-a72b-0800200c9a66");
+ *   var date, string, hexString;
+ *   date   = uuid.getTimestamp();         // returns a JavaScript Date
+ *   date   = uuid.getTimestamp(Date);     // 
+ *   string = uuid.getTimestamp(String);   // "Mon, 16 Jan 2006 20:21:41 GMT"
+ *   hexString = uuid.getTimestamp("hex"); // "1da86cdb4308fb0"
+ * </pre>
+ *
+ * @return   Returns the timestamp value as a JavaScript Date object or a 15-character string of hex digits.
+ * @throws   Throws an Error if this is not a version 1 UUID.
+ */
+dojo.uuid.Uuid.prototype.getTimestamp = function(returnType) {
+	var errorMessage = "Called getTimestamp() on a dojo.uuid.Uuid that was not a TIME_BASED UUID.";
+	dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage);
+	
+	if (!returnType) {returnType = null};
+	switch (returnType) {
+		case "string":
+		case String:
+			return this.getTimestamp(Date).toUTCString();
+			break;
+		case "hex":
+			// Return a 15-character string of hex digits containing the 
+			// timestamp for this UUID, with the high-order bits first.
+			if (!this._timestampAsHexString) {
+				var arrayOfStrings = this._uuidString.split('-');
+				var hexTimeLow = arrayOfStrings[0];
+				var hexTimeMid = arrayOfStrings[1];
+				var hexTimeHigh = arrayOfStrings[2];
+			
+				// Chop off the leading "1" character, which is the UUID 
+				// version number for time-based UUIDs.
+				hexTimeHigh = hexTimeHigh.slice(1);
+			
+				this._timestampAsHexString = hexTimeHigh + hexTimeMid + hexTimeLow;
+				dojo.lang.assert(this._timestampAsHexString.length == 15);
+			}
+			return this._timestampAsHexString;
+			break;
+		case null: // no returnType was specified, so default to Date
+		case "date":
+		case Date:
+			// Return a JavaScript Date object. 
+			if (!this._timestampAsDate) {
+				var GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;
+			
+				var arrayOfParts = this._uuidString.split('-');
+				var timeLow = parseInt(arrayOfParts[0], dojo.uuid.Uuid.HEX_RADIX);
+				var timeMid = parseInt(arrayOfParts[1], dojo.uuid.Uuid.HEX_RADIX);
+				var timeHigh = parseInt(arrayOfParts[2], dojo.uuid.Uuid.HEX_RADIX);
+				var hundredNanosecondIntervalsSince1582 = timeHigh & 0x0FFF;
+				hundredNanosecondIntervalsSince1582 <<= 16;
+				hundredNanosecondIntervalsSince1582 += timeMid;
+				// What we really want to do next is shift left 32 bits, but the 
+				// result will be too big to fit in an int, so we'll multiply by 2^32,
+				// and the result will be a floating point approximation.
+				hundredNanosecondIntervalsSince1582 *= 0x100000000;
+				hundredNanosecondIntervalsSince1582 += timeLow;
+				var millisecondsSince1582 = hundredNanosecondIntervalsSince1582 / 10000;
+			
+				// Again, this will be a floating point approximation.
+				// We can make things exact later if we need to.
+				var secondsPerHour = 60 * 60;
+				var hoursBetween1582and1970 = GREGORIAN_CHANGE_OFFSET_IN_HOURS;
+				var secondsBetween1582and1970 = hoursBetween1582and1970 * secondsPerHour;
+				var millisecondsBetween1582and1970 = secondsBetween1582and1970 * 1000;
+				var millisecondsSince1970 = millisecondsSince1582 - millisecondsBetween1582and1970;
+			
+				this._timestampAsDate = new Date(millisecondsSince1970);
+			}
+			return this._timestampAsDate;
+			break;
+		default:
+			// we got passed something other than a valid returnType
+			dojo.lang.assert(false, "The getTimestamp() method dojo.uuid.Uuid was passed a bogus returnType: " + returnType);
+			break;
+	}
+};

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/Uuid.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/__package__.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/__package__.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/__package__.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,22 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.kwCompoundRequire({
+	common: [
+		"dojo.uuid.Uuid",
+		"dojo.uuid.LightweightGenerator",
+		"dojo.uuid.RandomGenerator",
+		"dojo.uuid.TimeBasedGenerator",
+		"dojo.uuid.NameBasedGenerator",
+		"dojo.uuid.NilGenerator"
+	]
+});
+dojo.provide("dojo.uuid.*");
+

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/uuid/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/validate/web.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/validate/web.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/validate/web.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/validate/web.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,103 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.validate.web");
+dojo.require("dojo.validate.common");
+
+/**
+  Validates an IP address.
+  Supports 5 formats for IPv4: dotted decimal, dotted hex, dotted octal, decimal and hexadecimal.
+  Supports 2 formats for Ipv6.
+
+  @param value  A string.
+  @param flags  An object.  All flags are boolean with default = true.
+    flags.allowDottedDecimal  Example, 207.142.131.235.  No zero padding.
+    flags.allowDottedHex  Example, 0x18.0x11.0x9b.0x28.  Case insensitive.  Zero padding allowed.
+    flags.allowDottedOctal  Example, 0030.0021.0233.0050.  Zero padding allowed.
+    flags.allowDecimal  Example, 3482223595.  A decimal number between 0-4294967295.
+    flags.allowHex  Example, 0xCF8E83EB.  Hexadecimal number between 0x0-0xFFFFFFFF.
+      Case insensitive.  Zero padding allowed.
+    flags.allowIPv6   IPv6 address written as eight groups of four hexadecimal digits.
+    flags.allowHybrid   IPv6 address written as six groups of four hexadecimal digits
+      followed by the usual 4 dotted decimal digit notation of IPv4. x:x:x:x:x:x:d.d.d.d
+  @return  true or false
+*/
+dojo.validate.isIpAddress = function(value, flags) {
+	var re = new RegExp("^" + dojo.regexp.ipAddress(flags) + "$", "i");
+	return re.test(value);
+}
+
+/**
+  Checks if a string could be a valid URL.
+
+  @param value  A string.
+  @param flags  An object.
+    flags.scheme  Can be true, false, or [true, false]. 
+      This means: required, not allowed, or either.
+    flags in regexp.host can be applied.
+    flags in regexp.ipAddress can be applied.
+    flags in regexp.tld can be applied.
+  @return  true or false
+*/
+dojo.validate.isUrl = function(value, flags) {
+	var re = new RegExp("^" + dojo.regexp.url(flags) + "$", "i");
+	return re.test(value);
+}
+
+/**
+  Checks if a string could be a valid email address.
+
+  @param value  A string.
+  @param flags  An object.
+    flags.allowCruft  Allow address like <ma...@yahoo.com>.  Default is false.
+    flags in regexp.host can be applied.
+    flags in regexp.ipAddress can be applied.
+    flags in regexp.tld can be applied.
+  @return  true or false.
+*/
+dojo.validate.isEmailAddress = function(value, flags) {
+	var re = new RegExp("^" + dojo.regexp.emailAddress(flags) + "$", "i");
+	return re.test(value);
+}
+
+/**
+  Checks if a string could be a valid email address list.
+
+  @param value  A string.
+  @param flags  An object.
+    flags.listSeparator  The character used to separate email addresses.  Default is ";", ",", "\n" or " ".
+    flags in regexp.emailAddress can be applied.
+    flags in regexp.host can be applied.
+    flags in regexp.ipAddress can be applied.
+    flags in regexp.tld can be applied.
+  @return  true or false.
+*/
+dojo.validate.isEmailAddressList = function(value, flags) {
+	var re = new RegExp("^" + dojo.regexp.emailAddressList(flags) + "$", "i");
+	return re.test(value);
+}
+
+/**
+  Check if value is an email address list. If an empty list
+  is returned, the value didn't pass the test or it was empty.
+
+  @param value	A string
+  @param flags	An object (same as isEmailAddressList)
+  @return array of emails
+*/
+dojo.validate.getEmailAddressList = function(value, flags) {
+	if(!flags) { flags = {}; }
+	if(!flags.listSeparator) { flags.listSeparator = "\\s;,"; }
+
+	if ( dojo.validate.isEmailAddressList(value, flags) ) {
+		return value.split(new RegExp("\\s*[" + flags.listSeparator + "]\\s*"));
+	}
+	return [];
+}

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/validate/web.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionContainer.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionContainer.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionContainer.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,71 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.AccordionContainer");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.AccordionPane");
+
+dojo.widget.defineWidget(
+	"dojo.widget.AccordionContainer",
+	dojo.widget.HtmlWidget,
+	{
+		widgetType: "AccordionContainer",
+		isContainer: true,
+		labelNodeClass: "",
+		containerNodeClass: "",
+		allowCollapse: false,
+
+		addChild: function(widget, overrideContainerNode, pos, ref, insertIndex){
+			if (widget.widgetType != "AccordionPane") {
+				var wrapper=dojo.widget.createWidget("AccordionPane",{label: widget.label, open: widget.open, labelNodeClass: this.labelNodeClass, containerNodeClass: this.containerNodeClass, allowCollapse: this.allowCollapse });
+				wrapper.addChild(widget);
+				this.addWidgetAsDirectChild(wrapper);
+				this.registerChild(wrapper);
+				wrapper.setSizes();
+				return wrapper;
+			} else {
+				dojo.html.addClass(widget.containerNode, this.containerNodeClass);
+				dojo.html.addClass(widget.labelNode, this.labelNodeClass);
+				this.addWidgetAsDirectChild(widget);
+				this.registerChild(widget);	
+				widget.setSizes();
+				return widget;
+			}
+	        },
+	
+		postCreate: function() {
+			var tmpChildren = this.children;
+			this.children=[];
+			dojo.html.removeChildren(this.domNode);
+			dojo.lang.forEach(tmpChildren, dojo.lang.hitch(this,"addChild"));
+		},
+	
+		removeChild: function(widget) {
+			dojo.widget.AccordionContainer.superclass.removeChild.call(this, widget);
+			if(this.children[0]){
+				this.children[0].setSizes();
+			}
+		},
+		
+		onResized: function(){
+			this.children[0].setSizes();
+		}
+	}
+);
+
+// These arguments can be specified for the children of a Accordion
+// Since any widget can be specified as a child, mix them
+// into the base widget class.  (This is a hack, but it's effective.)
+dojo.lang.extend(dojo.widget.Widget, {
+	label: "",
+	open: false
+});
+

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionPane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionPane.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionPane.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionPane.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,12 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.AccordionPane");
+dojo.requireAfterIf("html", "dojo.widget.html.AccordionPane");

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AccordionPane.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AnimatedPng.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AnimatedPng.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AnimatedPng.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AnimatedPng.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,83 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.AnimatedPng");
+dojo.provide("dojo.widget.html.AnimatedPng");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+
+
+dojo.widget.defineWidget(
+	"dojo.widget.html.AnimatedPng",
+	dojo.widget.HtmlWidget,
+	{
+
+		widgetType: "AnimatedPng",
+		isContainer: false,
+
+		domNode: null,
+		width: 0,
+		height: 0,
+		aniSrc: '',
+		interval: 100,
+
+		cellWidth: 0,
+		cellHeight: 0,
+		aniCols: 1,
+		aniRows: 1,
+		aniCells: 1,
+
+		blankSrc: dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),
+
+		templateString: '<img class="dojoAnimatedPng" />',
+
+		postCreate: function(){
+			this.cellWidth = this.width;
+			this.cellHeight = this.height;
+
+			var img = new Image();
+			var self = this;
+
+			img.onload = function(){ self.initAni(img.width, img.height); };
+			img.src = this.aniSrc;
+		},
+
+		initAni: function(w, h){
+
+			this.domNode.src = this.blankSrc;
+			this.domNode.width = this.cellWidth;
+			this.domNode.height = this.cellHeight;
+			this.domNode.style.backgroundImage = 'url('+this.aniSrc+')';
+			this.domNode.style.backgroundRepeat = 'no-repeat';
+
+			this.aniCols = Math.floor(w/this.cellWidth);
+			this.aniRows = Math.floor(h/this.cellHeight);
+			this.aniCells = this.aniCols * this.aniRows;
+			this.aniFrame = 0;
+
+			window.setInterval(dojo.lang.hitch(this, 'tick'), this.interval);
+		},
+
+		tick: function(){
+
+			this.aniFrame++;
+			if (this.aniFrame == this.aniCells) this.aniFrame = 0;
+
+			var col = this.aniFrame % this.aniCols;
+			var row = Math.floor(this.aniFrame / this.aniCols);
+
+			var bx = -1 * col * this.cellWidth;
+			var by = -1 * row * this.cellHeight;
+
+			this.domNode.style.backgroundPosition = bx+'px '+by+'px';
+		}
+	}
+);

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/AnimatedPng.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Button2.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Button2.js?rev=413306&r1=413305&r2=413306&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Button2.js (original)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Button2.js Sat Jun 10 07:27:44 2006
@@ -8,26 +8,26 @@
 		http://dojotoolkit.org/community/licensing.shtml
 */
 
-dojo.provide("dojo.widget.Button2");
-dojo.require("dojo.widget.Button");
-dojo.require("dojo.widget.*");
-
-dojo.widget.tags.addParseTreeHandler("dojo:button2");
-dojo.widget.tags.addParseTreeHandler("dojo:dropdownbutton2");
-dojo.widget.tags.addParseTreeHandler("dojo:combobutton2");
-
-dojo.deprecated("dojo.widget.Button2", "Use dojo.widget.Button instead", "0.4");
-
-dojo.requireAfterIf("html", "dojo.widget.html.Button2");
-
-dojo.widget.Button2 = function(){}
-dojo.inherits(dojo.widget.Button2, dojo.widget.Button);
-dojo.lang.extend(dojo.widget.Button2, { widgetType: "Button2" });
-
-dojo.widget.DropDownButton2 = function(){}
-dojo.inherits(dojo.widget.DropDownButton2, dojo.widget.DropDownButton);
-dojo.lang.extend(dojo.widget.DropDownButton2, { widgetType: "DropDownButton2" });
-
-dojo.widget.ComboButton2 = function(){}
-dojo.inherits(dojo.widget.ComboButton2, dojo.widget.ComboButton);
+dojo.provide("dojo.widget.Button2");
+dojo.require("dojo.widget.Button");
+dojo.require("dojo.widget.*");
+
+dojo.widget.tags.addParseTreeHandler("dojo:button2");
+dojo.widget.tags.addParseTreeHandler("dojo:dropdownbutton2");
+dojo.widget.tags.addParseTreeHandler("dojo:combobutton2");
+
+dojo.deprecated("dojo.widget.Button2", "Use dojo.widget.Button instead", "0.4");
+
+dojo.requireAfterIf("html", "dojo.widget.html.Button2");
+
+dojo.widget.Button2 = function(){}
+dojo.inherits(dojo.widget.Button2, dojo.widget.Button);
+dojo.lang.extend(dojo.widget.Button2, { widgetType: "Button2" });
+
+dojo.widget.DropDownButton2 = function(){}
+dojo.inherits(dojo.widget.DropDownButton2, dojo.widget.DropDownButton);
+dojo.lang.extend(dojo.widget.DropDownButton2, { widgetType: "DropDownButton2" });
+
+dojo.widget.ComboButton2 = function(){}
+dojo.inherits(dojo.widget.ComboButton2, dojo.widget.ComboButton);
 dojo.lang.extend(dojo.widget.ComboButton2, { widgetType: "ComboButton2" });

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Checkbox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Checkbox.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Checkbox.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Checkbox.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.Checkbox");
+
+dojo.requireAfterIf("html", "dojo.widget.html.Checkbox");

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/Checkbox.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ColorPalette.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ColorPalette.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ColorPalette.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ColorPalette.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,186 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.ColorPalette");
+dojo.provide("dojo.widget.html.ColorPalette");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.Toolbar");
+dojo.require("dojo.html");
+
+dojo.widget.tags.addParseTreeHandler("dojo:ToolbarColorDialog");
+
+dojo.widget.html.ToolbarColorDialog = function(){
+	dojo.widget.html.ToolbarDialog.call(this);
+	
+	/*
+	FIXME: 	why the fuck did anyone ever think this kind of expensive iteration
+			was a good idea?
+
+	for (var method in this.constructor.prototype) {
+		this[method] = this.constructor.prototype[method];
+	}
+	*/
+}
+
+dojo.inherits(dojo.widget.html.ToolbarColorDialog, dojo.widget.html.ToolbarDialog);
+
+dojo.lang.extend(dojo.widget.html.ToolbarColorDialog, {
+
+	widgetType: "ToolbarColorDialog",
+
+	palette: "7x10",
+
+	fillInTemplate: function (args, frag) {
+		dojo.widget.html.ToolbarColorDialog.superclass.fillInTemplate.call(this, args, frag);
+		this.dialog = dojo.widget.createWidget("ColorPalette", {palette: this.palette});
+		this.dialog.domNode.style.position = "absolute";
+
+		dojo.event.connect(this.dialog, "onColorSelect", this, "_setValue");
+	},
+
+	_setValue: function(color) {
+		this._value = color;
+		this._fireEvent("onSetValue", color);
+	},
+	
+	showDialog: function (e) {
+		dojo.widget.html.ToolbarColorDialog.superclass.showDialog.call(this, e);
+		var x = dojo.html.getAbsoluteX(this.domNode);
+		var y = dojo.html.getAbsoluteY(this.domNode) + dojo.html.getInnerHeight(this.domNode);
+		this.dialog.showAt(x, y);
+	},
+	
+	hideDialog: function (e) {
+		dojo.widget.html.ToolbarColorDialog.superclass.hideDialog.call(this, e);
+		this.dialog.hide();
+	}
+});
+
+
+
+dojo.widget.tags.addParseTreeHandler("dojo:colorpalette");
+
+dojo.widget.html.ColorPalette = function () {
+	dojo.widget.HtmlWidget.call(this);
+}
+
+dojo.inherits(dojo.widget.html.ColorPalette, dojo.widget.HtmlWidget);
+
+dojo.lang.extend(dojo.widget.html.ColorPalette, {
+
+	widgetType: "colorpalette",
+	
+	palette: "7x10",
+
+	bgIframe: null,
+	
+	palettes: {
+		"7x10": [["fff", "fcc", "fc9", "ff9", "ffc", "9f9", "9ff", "cff", "ccf", "fcf"],
+			["ccc", "f66", "f96", "ff6", "ff3", "6f9", "3ff", "6ff", "99f", "f9f"],
+			["c0c0c0", "f00", "f90", "fc6", "ff0", "3f3", "6cc", "3cf", "66c", "c6c"],
+			["999", "c00", "f60", "fc3", "fc0", "3c0", "0cc", "36f", "63f", "c3c"],
+			["666", "900", "c60", "c93", "990", "090", "399", "33f", "60c", "939"],
+			["333", "600", "930", "963", "660", "060", "366", "009", "339", "636"],
+			["000", "300", "630", "633", "330", "030", "033", "006", "309", "303"]],
+	
+		"3x4": [["ffffff"/*white*/, "00ff00"/*lime*/, "008000"/*green*/, "0000ff"/*blue*/],
+			["c0c0c0"/*silver*/, "ffff00"/*yellow*/, "ff00ff"/*fuchsia*/, "000080"/*navy*/],
+			["808080"/*gray*/, "ff0000"/*red*/, "800080"/*purple*/, "000000"/*black*/]]
+			//["00ffff"/*aqua*/, "808000"/*olive*/, "800000"/*maroon*/, "008080"/*teal*/]];
+	},
+
+	buildRendering: function () {
+		
+		this.domNode = document.createElement("table");
+		dojo.html.disableSelection(this.domNode);
+		dojo.event.connect(this.domNode, "onmousedown", function (e) {
+			e.preventDefault();
+		});
+		with (this.domNode) { // set the table's properties
+			cellPadding = "0"; cellSpacing = "1"; border = "1";
+			style.backgroundColor = "white"; //style.position = "absolute";
+		}
+		var tbody = document.createElement("tbody");
+		this.domNode.appendChild(tbody);
+		var colors = this.palettes[this.palette];
+		for (var i = 0; i < colors.length; i++) {
+			var tr = document.createElement("tr");
+			for (var j = 0; j < colors[i].length; j++) {
+				if (colors[i][j].length == 3) {
+					colors[i][j] = colors[i][j].replace(/(.)(.)(.)/, "$1$1$2$2$3$3");
+				}
+	
+				var td = document.createElement("td");
+				with (td.style) {
+					backgroundColor = "#" + colors[i][j];
+					border = "1px solid gray";
+					width = height = "15px";
+					fontSize = "1px";
+				}
+	
+				td.color = "#" + colors[i][j];
+	
+				td.onmouseover = function (e) { this.style.borderColor = "white"; }
+				td.onmouseout = function (e) { this.style.borderColor = "gray"; }
+				dojo.event.connect(td, "onmousedown", this, "click");
+	
+				td.innerHTML = "&nbsp;";
+				tr.appendChild(td);
+			}
+			tbody.appendChild(tr);
+		}
+
+		if(dojo.render.html.ie){
+			this.bgIframe = document.createElement("<iframe frameborder='0' src='javascript:void(0);'>");
+			with(this.bgIframe.style){
+				position = "absolute";
+				left = top = "0px";
+				display = "none";
+			}
+			document.body.appendChild(this.bgIframe);
+			dojo.style.setOpacity(this.bgIframe, 0);
+		}
+	},
+
+	click: function (e) {
+		this.onColorSelect(e.currentTarget.color);
+		e.currentTarget.style.borderColor = "gray";
+	},
+
+	onColorSelect: function (color) { },
+
+	hide: function (){
+		this.domNode.parentNode.removeChild(this.domNode);
+		if(this.bgIframe){
+			this.bgIframe.style.display = "none";
+		}
+	},
+	
+	showAt: function (x, y) {
+		with(this.domNode.style){
+			top = y + "px";
+			left = x + "px";
+			zIndex = 999;
+		}
+		document.body.appendChild(this.domNode);
+		if(this.bgIframe){
+			with(this.bgIframe.style){
+				display = "block";
+				top = y + "px";
+				left = x + "px";
+				zIndex = 998;
+				width = dojo.html.getOuterWidth(this.domNode) + "px";
+				height = dojo.html.getOuterHeight(this.domNode) + "px";
+			}
+
+		}
+	}
+
+});

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ColorPalette.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ComboBox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ComboBox.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ComboBox.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ComboBox.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,235 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.ComboBox");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.event.*");
+
+dojo.widget.incrementalComboBoxDataProvider = function(url, limit, timeout){
+	this.searchUrl = url;
+	this.inFlight = false;
+	this.activeRequest = null;
+	this.allowCache = false;
+
+	this.cache = {};
+
+	this.init = function(cbox){
+		this.searchUrl = cbox.dataUrl;
+	}
+
+	this.addToCache = function(keyword, data){
+		if(this.allowCache){
+			this.cache[keyword] = data;
+		}
+	}
+
+	this.startSearch = function(searchStr, type, ignoreLimit){
+		if(this.inFlight){
+			// FIXME: implement backoff!
+		}
+		var tss = encodeURIComponent(searchStr);
+		var realUrl = dojo.string.paramString(this.searchUrl, {"searchString": tss});
+		var _this = this;
+		var request = dojo.io.bind({
+			url: realUrl,
+			method: "get",
+			mimetype: "text/json",
+			load: function(type, data, evt){
+				_this.inFlight = false;
+				if(!dojo.lang.isArray(data)){
+					var arrData = [];
+					for(var key in data){
+						arrData.push([data[key], key]);
+					}
+					data = arrData;
+				}
+				_this.addToCache(searchStr, data);
+				_this.provideSearchResults(data);
+			}
+		});
+		this.inFlight = true;
+	}
+}
+
+dojo.widget.ComboBoxDataProvider = function(dataPairs, limit, timeout){
+	// NOTE: this data provider is designed as a naive reference
+	// implementation, and as such it is written more for readability than
+	// speed. A deployable data provider would implement lookups, search
+	// caching (and invalidation), and a significantly less naive data
+	// structure for storage of items.
+
+	this.data = [];
+	this.searchTimeout = 500;
+	this.searchLimit = 30;
+	this.searchType = "STARTSTRING"; // may also be "STARTWORD" or "SUBSTRING"
+	this.caseSensitive = false;
+	// for caching optimizations
+	this._lastSearch = "";
+	this._lastSearchResults = null;
+
+	this.init = function(cbox, node){
+		if(!dojo.string.isBlank(cbox.dataUrl)){
+			this.getData(cbox.dataUrl);
+		}else{
+			// check to see if we can populate the list from <option> elements
+			if((node)&&(node.nodeName.toLowerCase() == "select")){
+				// NOTE: we're not handling <optgroup> here yet
+				var opts = node.getElementsByTagName("option");
+				var ol = opts.length;
+				var data = [];
+				for(var x=0; x<ol; x++){
+					var keyValArr = [new String(opts[x].innerHTML), new String(opts[x].value)];
+					data.push(keyValArr);
+					if(opts[x].selected){ 
+						cbox.setAllValues(keyValArr[0], keyValArr[1]);
+					}
+				}
+				this.setData(data);
+			}
+		}
+	}
+
+	this.getData = function(url){
+		dojo.io.bind({
+			url: url,
+			load: dojo.lang.hitch(this, function(type, data, evt){ 
+				if(!dojo.lang.isArray(data)){
+					var arrData = [];
+					for(var key in data){
+						arrData.push([data[key], key]);
+					}
+					data = arrData;
+				}
+				this.setData(data);
+			}),
+			mimetype: "text/json"
+		});
+	}
+
+	this.startSearch = function(searchStr, type, ignoreLimit){
+		// FIXME: need to add timeout handling here!!
+		this._preformSearch(searchStr, type, ignoreLimit);
+	}
+
+	this._preformSearch = function(searchStr, type, ignoreLimit){
+		//
+		//	NOTE: this search is LINEAR, which means that it exhibits perhaps
+		//	the worst possible speed characteristics of any search type. It's
+		//	written this way to outline the responsibilities and interfaces for
+		//	a search.
+		//
+		var st = type||this.searchType;
+		// FIXME: this is just an example search, which means that we implement
+		// only a linear search without any of the attendant (useful!) optimizations
+		var ret = [];
+		if(!this.caseSensitive){
+			searchStr = searchStr.toLowerCase();
+		}
+		for(var x=0; x<this.data.length; x++){
+			if((!ignoreLimit)&&(ret.length >= this.searchLimit)){
+				break;
+			}
+			// FIXME: we should avoid copies if possible!
+			var dataLabel = new String((!this.caseSensitive) ? this.data[x][0].toLowerCase() : this.data[x][0]);
+			if(dataLabel.length < searchStr.length){
+				// this won't ever be a good search, will it? What if we start
+				// to support regex search?
+				continue;
+			}
+
+			if(st == "STARTSTRING"){
+				// jum.debug(dataLabel.substr(0, searchStr.length))
+				// jum.debug(searchStr);
+				if(searchStr == dataLabel.substr(0, searchStr.length)){
+					ret.push(this.data[x]);
+				}
+			}else if(st == "SUBSTRING"){
+				// this one is a gimmie
+				if(dataLabel.indexOf(searchStr) >= 0){
+					ret.push(this.data[x]);
+				}
+			}else if(st == "STARTWORD"){
+				// do a substring search and then attempt to determine if the
+				// preceeding char was the beginning of the string or a
+				// whitespace char.
+				var idx = dataLabel.indexOf(searchStr);
+				if(idx == 0){
+					// implicit match
+					ret.push(this.data[x]);
+				}
+				if(idx <= 0){
+					// if we didn't match or implicily matched, march onward
+					continue;
+				}
+				// otherwise, we have to go figure out if the match was at the
+				// start of a word...
+				// this code is taken almost directy from nWidgets
+				var matches = false;
+				while(idx!=-1){
+					// make sure the match either starts whole string, or
+					// follows a space, or follows some punctuation
+					if(" ,/(".indexOf(dataLabel.charAt(idx-1)) != -1){
+						// FIXME: what about tab chars?
+						matches = true; break;
+					}
+					idx = dataLabel.indexOf(searchStr, idx+1);
+				}
+				if(!matches){
+					continue;
+				}else{
+					ret.push(this.data[x]);
+				}
+			}
+		}
+		this.provideSearchResults(ret);
+	}
+
+	this.provideSearchResults = function(resultsDataPairs){
+	}
+
+	this.addData = function(pairs){
+		// FIXME: incredibly naive and slow!
+		this.data = this.data.concat(pairs);
+	}
+
+	this.setData = function(pdata){
+		// populate this.data and initialize lookup structures
+		this.data = pdata;
+	}
+	
+	if(dataPairs){
+		this.setData(dataPairs);
+	}
+}
+
+dojo.declare(
+	"dojo.widget.ComboBox",
+	null,
+	{
+		widgetType: "ComboBox",
+		isContainer: false,
+	
+		forceValidOption: false,
+		searchType: "stringstart",
+		dataProvider: null,
+	
+		startSearch: function(searchString){},
+		openResultList: function(results){},
+		clearResultList: function(){},
+		hideResultList: function(){},
+		selectNextResult: function(){},
+		selectPrevResult: function(){},
+		setSelectedResult: function(){}
+	}
+);
+
+// render-specific includes
+dojo.requireAfterIf("html", "dojo.widget.html.ComboBox");

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/ComboBox.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DebugConsole.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DebugConsole.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DebugConsole.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DebugConsole.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,22 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.DebugConsole");
+dojo.require("dojo.widget.Widget");
+
+dojo.widget.DebugConsole= function(){
+	dojo.widget.Widget.call(this);
+
+	this.widgetType = "DebugConsole";
+	this.isContainer = true;
+}
+dojo.inherits(dojo.widget.DebugConsole, dojo.widget.Widget);
+dojo.widget.tags.addParseTreeHandler("dojo:debugconsole");
+dojo.requireAfterIf("html", "dojo.widget.html.DebugConsole");

Added: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DocPane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DocPane.js?rev=413306&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DocPane.js (added)
+++ tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DocPane.js Sat Jun 10 07:27:44 2006
@@ -0,0 +1,12 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.widget.DocPane");
+dojo.requireAfterIf("html", "dojo.widget.html.DocPane");

Propchange: tapestry/tapestry4/trunk/framework/src/js/dojo/src/widget/DocPane.js
------------------------------------------------------------------------------
    svn:eol-style = native