You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/06/30 00:10:06 UTC

svn commit: r552069 - in /incubator/xap/trunk/codebase/src/xap: application/ bridges/basic/ bridges/dojo/ data/ data/datasource/ macro/ requestservice/ session/ taghandling/ util/ xml/dom/events/

Author: jmargaris
Date: Fri Jun 29 17:10:05 2007
New Revision: 552069

URL: http://svn.apache.org/viewvc?view=rev&rev=552069
Log:
documentation changes

Modified:
    incubator/xap/trunk/codebase/src/xap/application/Application.js
    incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js
    incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js
    incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoWidgetBridge.js
    incubator/xap/trunk/codebase/src/xap/data/DataFramework.js
    incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js
    incubator/xap/trunk/codebase/src/xap/macro/Macro.js
    incubator/xap/trunk/codebase/src/xap/requestservice/HttpRequest.js
    incubator/xap/trunk/codebase/src/xap/session/ClientEvent.js
    incubator/xap/trunk/codebase/src/xap/session/EventHandler.js
    incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js
    incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js
    incubator/xap/trunk/codebase/src/xap/util/ArrayHelper.js
    incubator/xap/trunk/codebase/src/xap/util/Character.js
    incubator/xap/trunk/codebase/src/xap/util/EscapeSyntaxParser.js
    incubator/xap/trunk/codebase/src/xap/util/Exception.js
    incubator/xap/trunk/codebase/src/xap/xml/dom/events/StructureChangeEvent.js

Modified: incubator/xap/trunk/codebase/src/xap/application/Application.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/application/Application.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/application/Application.js (original)
+++ incubator/xap/trunk/codebase/src/xap/application/Application.js Fri Jun 29 17:10:05 2007
@@ -22,19 +22,13 @@
 Xap.require("xap.session.ClientSession");
 Xap.require("xap.log.Logger");
 
-
-/**
- * @fileoverview
- * @author bbuffone 
- */
  
-/**
- * @class 
- * xap.application.Application controls the creation of xap applications
- * This class is a developer facing class to instaniation a XAP application
- * with in a web page.
- *
- * Configuration object
+/** 
+ * Creates a new xap.application.Application.
+ * 
+ * @class xap.application.Application controls the creation of xap applications. Applications
+ * take a configuration object that looks like the below:
+ * 
  * <code><pre>
  * applicationConfig = {
  *		applicationName: "myApplication",
@@ -49,18 +43,14 @@
  * </pre></code>
  *
  * To obtain instances of an Application object store the return value from the Xap.createApplication()
- * method or use the <code>window.xapApplications["MyApplicationName"].</code> Application names can be 
+ * method or use <code>window.xapApplications["MyApplicationName"].</code> Application names can be 
  * supplied as an embedded attribute or via the XapConfig.js file.
- *
- * 
- * @author bbuffone 
  * @constructor
  * @param applicationConfig Configuration object passed in will override any properties 
  * supplied in the XapConfig.js.
- */ 
+ */
 xap.application.Application = function(applicationConfig) {
 	if (applicationConfig != null){
-		
 		/** @private */
     	this._applicationConfig = applicationConfig;
     }else{
@@ -122,19 +112,17 @@
 
 /**
  * Get the configuration object that was used to start the application. 
- * @return The configuration object containing the loaded configuration
- * file properties as will as the supplied properties to the constructor
+ * @return The configuration object supplied to the constructor.
  */
 xap.application.Application.prototype.getConfiguration = function() {
 	return this._applicationConfig;
 }
 
 /**
- * Get the configuration object that was used to start the application. 
- * @argument eventString A string that contains the event to be fires. The string can
- * contain all of the same events that are supplied to a component event handler.
- * @return Any any information that is supplied be the 
- * EventHandler.fireEvent
+ * Fires an application event.
+ * @argument eventString A string in standard event-handler form,
+ * such as <code>mco:myMco.do()</code>.
+ * @return The result of calling the event.
  */
 xap.application.Application.prototype.fireEvent = function(eventString) {
     var clientEvent = new xap.session.ClientEvent(null, this.getSession());

Modified: incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js Fri Jun 29 17:10:05 2007
@@ -28,16 +28,6 @@
 Xap.require("dojo.html.*");
 Xap.require("xap.util.ArrayHelper");
 
- 
-/**
- *  @fileoverview
- * 
- * 
- *  A class of  intended as an abstract superclass for  other bridges.
-**/
- 
- 
-
  /*
  * TO_DO:  1.) Find better names for the methods that return DOM nodes (to be used as parents and children), will
  * need to create one (am currently using getNodeForChildren() for parent and container, a bad idea.)
@@ -50,31 +40,22 @@
  /**
  * Creates a xap.bridges.basic.AbstractWidgetBridge.
  * 
- *  A subclass of <code>xap.taghandling.AbstractTagImpl</code>
- *  intended as an abstract<code> </code>superclass for the
- *  other bridges.&nbsp; The goal was to create a class that maps out the
- *  behaviors needed by all bridges without fixing them in stone; to that
- *  end there are many calls to methods which are either not implemented
- *  here at all, or are implemented with lowest common denominator
- *  behaviors that might well need overriding or supplementing in
- *  subclasses. It is hoped (and in the case of Dojo, known) that 
- * a similar abstract class can implement toolkit-specific behaviors
- * that will allow the actual widget bridges themselves to be relatively lightweight.
- * <br/>
+ * @class A subclass of <code>xap.taghandling.AbstractTagImpl</code>
+ * intended as an abstract superclass for widget bridges.
  *
  * @constructor
- * 
- * @author mturyn
  * @see xap.taghandling.AbstractTagImpl
- * @see xap.session.ClientSession#createInitialDocument
  * @see xap.bridges.dojo.DojoWidgetBridge 
  */
 xap.bridges.basic.AbstractWidgetBridge =  function() {
+	/** @private */
 	this._disabled = false;
 	/* this._wantsMouseEvents = false; used to determine if we want to listen to mouse events */
 	xap.taghandling.AbstractTagImpl.call( this );
 }
 
+//SETUP SUBCLASS does this but we need this for doc to pick it up correctly
+xap.bridges.basic.AbstractWidgetBridge.prototype = new xap.taghandling.AbstractTagImpl();
 
 Xap.setupClassAsSubclassOf("xap.bridges.basic.AbstractWidgetBridge","xap.taghandling.AbstractTagImpl");
 
@@ -94,18 +75,16 @@
 
 
 /**
- * All bridges to should go through these steps:
+ * Performs the following steps:
  * <ol>
- * <li>: Create or obtain the peer object
- * <li>: Handle all the initial attributes
- * <li>: Recursively parse the inititial children
+ * <li>Calls <code>createPeer()</code> which should in turn call <code>setPeer()</code>
+ * with a peer class.</li>
+ * <li>Sets up class names on the root dom node.</li>
+ * <li>Calls <code>parseInitialAttributes()</code> to handle existing attributes
+ * on the element bridged by this class.</li>
+ * <li>Calls <code>parseInitialChildren()</code> to handle existing children
+ * on the element bridged by this class.</li>
  * </ol>
-* First <code>createPeer</code>
- * (see below) and attribute- and children-parsing routines called, but
- * these latter two shouldn't need to be
- * changed from their implementations in <code>xap.taghandling.AbstractTagImpl</code>.</li>
- * @see xap.session.ClientSession#_createInitialDocument
- * 
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.init = function() {
 	if ( !this._getNameToSetterMap()  ){
@@ -143,6 +122,7 @@
 /**
  * The map that [add|remove]Class will use to
  * find html dom nodes to style:
+ * @private
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.getStylingNodesMap = function(){
 	if( ! this._stylingNodeMap ){
@@ -151,6 +131,10 @@
 	return this._stylingNodeMap ;
 }
 
+/**
+ * Called when an element is removed from the DOM, this will call
+ * <code>cleanNode</code> on the root node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.unload = function() {
 	var rootNode = this.getRootDomNode();
 	if (rootNode){
@@ -175,8 +159,8 @@
 xap.bridges.basic.AbstractWidgetBridge.ON="on" ;
 
 /**
- * @static
- *   Determines if an object, typically a member on another object,  is a function.
+ * Determines if an object, typically a member on another object, is a function.
+ * @private
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.s_IsFunction = function(aMember){
 	var typ =  typeof aMember ;
@@ -300,9 +284,9 @@
 }
 
 /**
-  *  Default behaviour: most widgets are not containers, so they have
-  *  none such.  Lowest common denominator.
- **/
+ * Returns the HTML node that children should be added to. The default implementation
+ * of this simply returns null; subclasses should override this.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getNodeForChildren =  function(){
 	return null;
 }
@@ -311,18 +295,28 @@
  * Returns the node that represents this widget at the top level,
  * for example the wrapping div. We will set basic attributes
  * like color on this div in the absence of better setter methods.
+ * The default implementation
+ * of this simply returns null; subclasses should override this.
  */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getRootDomNode =  function(){
 	return null;
 }
 
+/** @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getStyleClassNames = function(){
 	return this._styleClassNames ;
 }
+
+/** @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setStyleClassNames = function(aStringArray){
 	this._styleClassNames = aStringArray ;
 }
 
+/**
+ * Returns the style name that is appended to the root dom node. This is based on
+ * a simple formula, "xap" + the name of the element node with the first letter
+ * capitalized, for example "xapLabel" or "xapButton".
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getCssStyleName = function(){
 	// This result should be normally be cached as the first element
 	// in the array backing up this.getStyleClassNames(), "this._styleClassNames"
@@ -331,7 +325,7 @@
 	return "xap" + nodeName.substring(0,1).toUpperCase() + nodeName.substring(1);
 }
 
-
+/** @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype.addStyleState = function( pStateName){
 	var nodeMap = this.getStylingNodesMap() ;
 	// Assume root dom node is included in the map as nodeMap[""]---legal,
@@ -347,6 +341,7 @@
 	}
 }	
 
+/** @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype.removeStyleState = function( pStateName){
 	var nodeMap = this.getStylingNodesMap() ;
 	// Assume root dom node is included in the map as nodeMap[""]---legal.
@@ -365,6 +360,7 @@
 /**
  *  @param nodeName{string} If given, turns a class name like
  *  "xapFooMouseOver" into "xapFooHeaderMouseOver":
+ * @private
  *
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype._addStyleStateToOneNode = function( pStateName, pNode,pNodeLabel ){	
@@ -385,6 +381,7 @@
 /**
  *  @param nodeName{string} If given, turns a class name like
  *  "xapFooMouseOver" into "xapFooHeaderMouseOver":
+ * @private
  *
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype._removeStyleStateFromOneNode = function( pStateName, pNode,pNodeLabel ){
@@ -395,7 +392,7 @@
 			//      "xapButton" + "Contents"+"MouseOver" 
 			// ---the class to apply to a button's "Contents" node on mouse-over
 			// or
-			//      "xapButton" + ""+"MouseOver" 			
+			//      "xapButton" + ""+"MouseOver" 			 
 			// ---the class to apply to a button's "root dom node"
 			dojo.html.removeClass(
 							pNode,
@@ -417,12 +414,22 @@
 		 	} ;
 }
 
+/**
+ * Calls <code>addChild()</code> with the child handler class and the index.
+ * Subclasses should typically override <code>addChild()</code> rather than this method.
+ * @see #addChild
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.childAdded = function( e ) {
 	var childElement = e.getChange();
 	var childHandler = this.getUiContentHandler().getHandlerForElement( childElement );
 	this.addChild(childHandler, e.getIndex());
 }
 
+/**
+ * Calls <code>removeChild()</code> with the child handler class.
+ * Subclasses should typically override <code>removeChild()</code> rather than this method.
+ * @see #removeChild
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onChildRemoved = function (e) {
    var childElement = e.getChange();
 	var childHandler = this.getUiContentHandler().getHandlerForElement( childElement );
@@ -432,6 +439,13 @@
 	xap.taghandling.AbstractTagImpl.prototype.onChildRemoved.call( this, e );
 }
 
+/**
+ * Called when a child is added to the element handled by this instance. The default implmentation
+ * will append the root dom node of the child to the node returned by <code>getNodeForChildren()</code> on
+ * this instance.
+ * @param {xap.taghandling.AbstractTagImpl} childHandler The handler for the child that was added.
+ * @param {int} index The index the child was added at.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.addChild = function(childHandler, index){
 	if (this.getNodeForChildren && this.getNodeForChildren() && 
 		childHandler.getRootDomNode && childHandler.getRootDomNode()){
@@ -447,7 +461,13 @@
 	}
 }
 
-xap.bridges.basic.AbstractWidgetBridge.prototype.removeChild = function(childHandler, index){
+/**
+ * Called when a child is removed from the element handled by this instance. The default implmentation
+ * will remove the root dom node of the child from the node returned by <code>getNodeForChildren()</code> on
+ * this instance.
+ * @param {xap.taghandling.AbstractTagImpl} childHandler The handler for the child that was removed.
+ */
+xap.bridges.basic.AbstractWidgetBridge.prototype.removeChild = function(childHandler){
 	if (this.getNodeForChildren && this.getNodeForChildren() &&
 	childHandler.getRootDomNode && childHandler.getRootDomNode()){
 		this.getNodeForChildren().removeChild(childHandler.getRootDomNode());
@@ -458,6 +478,8 @@
 /**
  *	Default behavior:  mirror all "onXXX" methods on the bridge using <code>fireEvent</code> calls
  *   ---we can change this in subclasses if we don't like it.  
+ * @private
+ * TODO we rarely use this, remove it?
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.findPeerEvents= function() {
 	if(! this.eventTriggers ){
@@ -485,6 +507,8 @@
  *	@return An HTML object (e.g., a DIV or a TD or...) which this widget can replace---this
  * both works with Dojo's way of doing things, and (more generally) allows a designer to
  * lay out the location for a component.
+ * 
+ * @private
  *
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.getSpecifiedDisplayNode = function(){
@@ -494,13 +518,11 @@
 }
 
   
- /**
- * When a XAL attribute is processed, it triggers a call to <code>attributeSet()</code>;
- * here we call a basic mechanism:  each bridge is supposed to map a XAP attribute to
- * a method on the bridge class---the mapping used is left up to the subclasses at the
- * toolkit or widget level.
- * @param event{AttributeChangeEvent}
-**/
+/**
+ * This will call the appropriate setter function based on the name of the attribute being set,
+ * for example <code>setVisibleAttribute</code> for "visible", <code>setWidthAttribute</code>
+ * for "width", etc.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.attributeSet = function( event ) { 
 	var name = event.getName(); 
 	var value = event.getNewValue(); 
@@ -535,6 +557,8 @@
  * to our own "onCommand".  Generally not used these days, but 
  * a reasonable quick-and-dirty way of implementing a bridge's
  * connections, so suitable for one-offs:
+ * @private
+ * TODO we rarely use this remove it?
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.autoAttachBridgeEventsToPeerEvents = function(){
 
@@ -568,7 +592,11 @@
 
 
 
-
+/**
+ * Returns an array of attribute names that this bridge class
+ * recognizes. This method should not be overwritten, instead
+ * developers should override <code>getNewAllowedAttributes()</code>.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getAllowedAttributes = function(){
 	// We need this to be an instance method to make it automatically
 	// heritable, but we're actually doing everything on the class/constructor:
@@ -604,6 +632,7 @@
 /**
  * Set this xaplet's location in the HTML DOM:
  * @param parentPeerDomNode---default location.... 
+ * @private
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.setHtmlDomLocation = function(parentPeerDomNode){
 	// By default, component goes within parent's HTML DOM node;
@@ -632,11 +661,15 @@
  * @param name{string}---the name of the property to be set
  * @return {Object} the function the above maps-to, according to 
  * <center><code>  foo &rarr;  bridgeClass.prototype.setFooAttribute  </code></center>
+ * @private
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype.getSetterFunctionForAttribute  = function( name ) {
 	return this._getNameToSetterMap() [name] ;
 }
 
+/**
+ * @private
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.initialiseAttributeMaps = function(){
 	// Initialise the default name-to[gs]etter  map used under attributeSet:
 	
@@ -654,6 +687,19 @@
 	}	
 }
 
+/**
+ * Returns a list of attributes supported by this bridge class that the superclass
+ * does not support. Developers should override this method to handle more attributes.
+ * Be default the following attributes are handled:<br>
+ * "id","x","y","width","height","backgroundColor","backgroundImage","class",
+		"borderWidth","borderColor","borderStyle","margin",
+		"padding","color","cursor","textDecoration","fontFamily",
+		"fontStyle","fontWeight", "fontSize", "textAlign",
+		"popup","tooltip", "focused", "disabled","visible",
+		"onActiveGained","onActiveLost","onDoubleClick","onKeyDown",
+		"onKeyUp","onKeyChar","onMouseDown","onMouseUp","onMouseMove","onMouseOver","onMouseOut"
+ * 
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getNewAllowedAttributes = function(){
 	return ["id","x","y","width","height","backgroundColor","backgroundImage","class",
 		"borderWidth","borderColor","borderStyle","margin",
@@ -669,31 +715,46 @@
  * Returns a mapping of a property name to a setter instance method; the 
  * dictionary itself is held on the class (constructor), since it should be
  * the same for all instances.
-**/ 
+ * @private
+ */ 
 xap.bridges.basic.AbstractWidgetBridge.prototype._getNameToSetterMap = function(){
 	return this.constructor._nameToSetterMap ;
 }
 
-/** XML attribute set method for "id" - copies the id attribute to the peer */
+/**
+ * Default setter for the "id" attribute, sets the "id" attribute on the underlying
+ * root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setIdAttribute = function(value){
 		if (this.getRootDomNode()){
 			this.getRootDomNode().setAttribute("id", value);
 		}
 }
 
+/**
+ * Default setter for the "backgroundImage" attribute, sets the style.backgroundImage
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setBackgroundImageAttribute = function(value){
 	if (this.getRootDomNode()){
         this.getRootDomNode().style.backgroundImage = "url(" + value + ")";
     }
 }
 
+/**
+ * Default setter for the "cursor" attribute, sets the style.cursor
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setCursorAttribute = function(value){
 	if (this.getRootDomNode()){ // TODO this can be a url, make sure it is handled in the future
         this.getRootDomNode().style.cursor = value;
     }
 }
 
-/** XML attribute set method for "visible" */
+/**
+ * Default setter for the "visible" attribute, sets the style.visibility
+ * and style.display properties on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setVisibleAttribute = function(value){
 	var rootNode = this.getRootDomNode();
 	if (!rootNode) return;
@@ -723,38 +784,64 @@
 	}
 }
 
-/** XML attribute set methods for onXXX start */
-
+/**
+ * Default setter for the "onActiveGained" attribute, connects the <code>onfocus</code>
+ * event on the root dom node to the <code>onActiveGained()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnActiveGainedAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onfocus", this, "onActiveGained");
 };
 
+/**
+ * Default setter for the "onActiveLost" attribute, connects the <code>onblur</code>
+ * event on the root dom node to the <code>onActiveLost()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnActiveLostAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onblur", this, "onActiveLost");
 };
 
+/**
+ * Default setter for the "onDoubleClick" attribute, connects the <code>ondblclick</code>
+ * event on the root dom node to the <code>onDblClick()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnDoubleClickAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"ondblclick", this, "onDblClick");
 };
 
+/**
+ * Default setter for the "onKeyDown" attribute, connects the <code>onkeydown</code>
+ * event on the root dom node to the <code>onKeyDown()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnKeyDownAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onkeydown", this, "onKeyDown");
 };
 
+/**
+ * Default setter for the "onKeyUp" attribute, connects the <code>onkeyup</code>
+ * event on the root dom node to the <code>onKeyUp()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnKeyUpAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onkeyup", this, "onKeyUp");
 };
 
+/**
+ * Default setter for the "onKeyChar" attribute, connects the <code>onkeypress</code>
+ * event on the root dom node to the <code>onKeyChar()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnKeyCharAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onkeypress", this, "onKeyChar");
 };
 
+/**
+ * Default setter for the "onMouseDown" attribute, connects the <code>onmousedown</code>
+ * event on the root dom node to the <code>onMouseDown()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnMouseDownAttribute = function(value) {
 	// connect event, discard value
 	if (!this._wantsMouseEvents) {
@@ -764,6 +851,10 @@
 	}
 };
 
+/**
+ * Default setter for the "onMouseUp" attribute, connects the <code>onmouseup</code>
+ * event on the root dom node to the <code>onMouseUp()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnMouseUpAttribute = function(value) {
 	// connect event, discard value
 	if (!this._wantsMouseEvents) {
@@ -773,11 +864,16 @@
     }
 };
 
+/**
+ * Default setter for the "onMouseMove" attribute, connects the <code>onmousemove</code>
+ * event on the root dom node to the <code>onMouseMove()</code> method of this instance.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnMouseMoveAttribute = function(value) {
 	// connect event, discard value
 	dojo.event.connectOnce(this.getRootDomNode(),"onmousemove", this, "onMouseMove");
 };
 
+
 xap.bridges.basic.AbstractWidgetBridge.prototype.setOnMouseOverAttribute = function(value) {
    	// Even if we don't want mouse events, if an onMouseOver is registered we should 
 	// connect mouse tracking events (for mouse enter and leave)
@@ -790,97 +886,149 @@
     this._trackMouseOver();
 };
 
-/** XML attribute set methods for onXXX end */
 
 
-/** XML attribute set method for "x" */
+/**
+ * Default setter for the "x" attribute, sets the style.left
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setXAttribute = function(value){
 	this.getRootDomNode().style.left = value ;
 }
 
-/** XML attribute set method for "y" */
+/**
+ * Default setter for the "y" attribute, sets the style.top
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setYAttribute = function(value){
 	this.getRootDomNode().style.top = value ;
 }
 
-/** XML attribute set method for "width" */
+/**
+ * Default setter for the "width" attribute, sets the style.width
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setWidthAttribute = function(value){
 	this.getRootDomNode().style.width = value ;
 }
 
-/** XML attribute set method for "height" */
+/**
+ * Default setter for the "height" attribute, sets the style.height
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setHeightAttribute = function(value){
 	this.getRootDomNode().style.height = value ;
 }
 
 
-/** XML attribute set method for "backgroundColor" */
+/**
+ * Default setter for the "backgroundColor" attribute, sets the style.backgroundColor
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setBackgroundColorAttribute = function(value){
 	this.getRootDomNode().style.backgroundColor = value ;
 }
 
-/** XML attribute set method for "borderWidth" */
+/**
+ * Default setter for the "borderWidth" attribute, sets the style.borderWidth
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setBorderWidthAttribute = function(value){
 	this.getRootDomNode().style.borderWidth = value ;
 }
 
-/** XML attribute set method for "borderStyle" */
+/**
+ * Default setter for the "borderStyle" attribute, sets the style.borderStyle
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setBorderStyleAttribute = function(value){
 	this.getRootDomNode().style.borderStyle = value ;
 }
 
-/** XML attribute set method for "borderColor" */
+/**
+ * Default setter for the "borderColor" attribute, sets the style.borderColor
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setBorderColorAttribute = function(value){
 	this.getRootDomNode().style.borderColor = value ;
 }
 
-/** XML attribute set method for "color" */
+/**
+ * Default setter for the "color" attribute, sets the style.color
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setColorAttribute = function(value){
 	this.getRootDomNode().style.color = value ;
 }
 
-/** XML attribute set method for "fontFamily" */
+/**
+ * Default setter for the "fontFamily" attribute, sets the style.fontFamily
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setFontFamilyAttribute = function(value){
 	this.getRootDomNode().style.fontFamily = value ;
 }
 
-/** XML attribute set method for "fontSize" */
+/**
+ * Default setter for the "fontSize" attribute, sets the style.fontSize
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setFontSizeAttribute = function(value){
 	this.getRootDomNode().style.fontSize = value ;
 }
 
-/** XML attribute set method for "fontStyle" */
+/**
+ * Default setter for the "fontStyle" attribute, sets the style.fontStyle
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setFontStyleAttribute = function(value){
 	this.getRootDomNode().style.fontStyle = value ;
 }
 
-/** XML attribute set method for "fontWeight" */
+/**
+ * Default setter for the "fontWeight" attribute, sets the style.fontWeight
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setFontWeightAttribute = function(value){
 	this.getRootDomNode().style.fontWeight = value ;
 }
 
-/** XML attribute set method for "margin" */
+/**
+ * Default setter for the "margin" attribute, sets the style.margin
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setMarginAttribute = function(value){
 	this.getRootDomNode().style.margin = value ;
 }
 
-/** XML attribute set method for "textDecoration" */
+/**
+ * Default setter for the "textDecoration" attribute, sets the style.textDecoration
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setTextDecorationAttribute = function(value){
 	this.getRootDomNode().style.textDecoration = value ;
 }
 
-/** XML attribute set method for "padding" */
+/**
+ * Default setter for the "padding" attribute, sets the style.padding
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setPaddingAttribute = function(value){
 	this.getRootDomNode().style.padding = value ;
 }
 
-/** XML attribute set method for "textAlign" */
+/**
+ * Default setter for the "textAlign" attribute, sets the style.textAlign
+ * property on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setTextAlignAttribute = function(value){
 	this.getRootDomNode().style.textAlign = value ;
 }
 
 /**
- * Subclasses must override this to provide a real behavior here
+ * Default setter for the "disabled" attribute, this will add a disabled style
+ * class to the root dom node. Subclasses should override this to provide
+ * component-specific behavior.
  */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setDisabledAttribute = function(value){
 	this._disabled = value=='true'?true:false;
@@ -897,6 +1045,10 @@
 	}
 }
 
+/**
+ * Default setter for the "popup" attribute, this will connect a dojo
+ * popup menu to the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setPopupAttribute = function(popupId) {
 	
 	// prevents circular dependency on PopupMenuBridge from breaking the build
@@ -920,6 +1072,10 @@
 }
 
 
+/**
+ * Default setter for the "tooltip" attribute, this will connect a dojo
+ * tooltip to the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setTooltipAttribute = function( text ){
 	//TODO should this accept a popup reference like #myTip ?
 	//TODO if they have OLD tooltip need to unregister it!!!
@@ -968,6 +1124,10 @@
 	dojo.event.connect(tooltip.connectNode, "onmouseover", tooltip, "onMouseOver"); 
 }
 
+/**
+ * Default setter for the "focused" attribute, this will call <code>focus()</code>
+ * on the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.setFocusedAttribute = function( text ){
 	if (text=="true"){
 		this._requestFocus();
@@ -988,6 +1148,7 @@
  * "myFooMouseOver" applied.
  * @param pClassStr{string} one or more base class names, space-separated
  * if more than one.
+ * @private
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype.addClassAttribute = function( pClassStr ){
 	// Allow users to be sloppy---multiple and/or leading and/or trailing 
@@ -1013,9 +1174,8 @@
 
 
 /**
- * When we "set" the class from an explicit class attribute,
- * we're really adding it to the base class:
- * 
+ * Default setter for the "class" attribute, this will add the space-separated
+ * list of class names to the root dom node.
  * TODO if they set the class to "a b c" and they already had "x y z"
  * we'll end up with all 6 on the element. Is this what we want or do we want
  * to remove x y & z?
@@ -1034,6 +1194,7 @@
  * The style states allowed to be concatenated
  * with (e.g.) xapButton to create (e.g.) "xapButtonFocused"
  * ---empty string is for the base state.
+ * @private
 **/ 
 xap.bridges.basic.AbstractWidgetBridge.prototype.getAllowedStyleStates = function(){
 	return ["","Disabled", "Focused", "MouseDown", "MouseOver"] ;
@@ -1043,6 +1204,7 @@
 /**
  * Removes a style class from our list of them, and from the dom node:
  * @param pClassStr{string} name of class to remove
+ * @private
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype.removeStyleClass = function( pClassStr ){
 	// Allow users to be sloppy---multiple and/or leading 
@@ -1077,6 +1239,7 @@
  * Removes all style class from our list of them, and from the dom node:
  * This is much more efficient than applying the <code>removeStyleClass</code>
  * methods on all classes, since that's O(n), making that O(n^2); this is O(n):
+ * @private
 **/
 xap.bridges.basic.AbstractWidgetBridge.prototype.removeAllStyleClasses = function(  ){
 	var iClasses = this.getStyleClassNames() ;
@@ -1108,7 +1271,7 @@
 
 
 
-
+/** @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype._requestFocus = function(){
 	var rootNode = this.getRootDomNode();
 	if (rootNode && rootNode.focus){	
@@ -1120,14 +1283,9 @@
 	}
 }
 
-
-/***
- * 
- * BASIC EVENT HANDLERS
- * 
- * 
- * 
- * 
+/**
+ * Fires an application onActiveGained event and adds a focused
+ * style class to the root dom node.
  */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onActiveGained = function(e){
 	if (!this._settingFocus){
@@ -1139,15 +1297,26 @@
 	}
 }
 
+/**
+ * Fires an application onActiveLost event and removes a Focused
+ * style class from the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onActiveLost = function(e){
 	this.removeStyleState("Focused");
 	this.fireEvent("onActiveLost");
 }
 
+/**
+ * Fires an application onDoubleClick event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onDblClick = function(e){
 	this.fireMouseEvent("onDoubleClick",e);
 }
 
+/**
+ * Fires an application onMouseDown event and adds a MouseDown
+ * style class to the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseDown = function(e){
 	if (!this._disabled){
 		this.addStyleState("MouseDown");
@@ -1155,6 +1324,10 @@
 	}
 }
 
+/**
+ * Fires an application onMouseUp event and removes a MouseDown
+ * style class from the root dom node.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseUp = function(e){
 	//IMPORTANT if you drag something then release it doesn't
 	//get a mouse up, we deal with this in Button need to deal with it
@@ -1165,6 +1338,9 @@
 	}
 }
 
+/**
+ * Fires an application onMouseMove event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseMove = function(e){
 	if (!this._disabled){
 		this.fireMouseEvent("onMouseMove",e);
@@ -1173,6 +1349,11 @@
 	}
 }
 
+/**
+ * Fires an application onMouseOver event and adds a MouseOver
+ * style class to the root dom node for widgets with the
+ * <code>_wantsMouseEvents</code> property set to true.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseOver= function(e){
 	
    	if (!this._disabled && !this._isMouseOver){
@@ -1187,6 +1368,9 @@
    	}
 }
 
+/**
+ * Fires an application onMouseOut event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseOut= function(e){
 	
 	/* only if we are in MouseOver state - remove the style and reconnect the mouse move */
@@ -1234,24 +1418,37 @@
 }
 
 
+/**
+ * Fires an application onKeyDown event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyDown = function(e){
 	if (!this._disabled){
 		this.fireKeyEvent("onKeyDown",e);
 	}
 }
 
+/**
+ * Fires an application onKeyUp event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyUp = function(e){
 	if (!this._disabled){
 		this.fireKeyEvent("onKeyUp",e);
 	}
 }
 
+/**
+ * Fires an application onKeyChar event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyChar = function(e){
 	if (!this._disabled){
 		this.fireKeyEvent("onKeyChar",e);
 	}
 }
 
+/**
+ * A helper method that stops an event from propagating and bubbling
+ * in a way that works across browsers.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.stopEvent = function(evt){
 	if (window.event){
 		window.event.returnValue=false;
@@ -1263,9 +1460,12 @@
 	}
 }
 
-// Helper function: 
-// Adds a comma-delimited list of modifiers to the mods property of the client 
-// event.
+/**
+ * @private
+ * Helper function: 
+ * Adds a comma-delimited list of modifiers to the mods property of the client 
+ * event.
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype._addKeyMods = function( event, htmlEvent){
     if (!htmlEvent || !event) {
         return;
@@ -1285,6 +1485,9 @@
     }
 }
 
+/**
+ * @private
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.getMouseButtonNumber = function(htmlEvent) {
     var buttonNumber = null;
     var browserButtonCode = htmlEvent.button;
@@ -1309,6 +1512,9 @@
     return buttonNumber;
 }
 
+/**
+ * @private
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.fireMouseEvent = function( eventName, htmlEvent){
     // optimization, check whether there is an event handler registered and exit fast first
     if (!this.getElement().getAttribute(eventName)) {
@@ -1328,6 +1534,9 @@
 	//IMPORTANT consumed, cancel?
 }
 
+/**
+ * @private
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.fireKeyEvent = function( eventName, htmlEvent){
     // optimization, check whether there is an event handler registered and exit fast first
     if (!this.getElement().getAttribute(eventName)) {
@@ -1349,11 +1558,14 @@
 	//IMPORTANT consumed, cancel?
 }
 
-// Mapper to specialized attribute removal methods:
+/** Mapper to specialized attribute removal methods:
+ * @private */
 xap.bridges.basic.AbstractWidgetBridge.prototype.attributeRemovers = new Object() ;
 
 
-
+/**
+ * @private
+ */
 xap.bridges.basic.AbstractWidgetBridge.prototype.onAttributeRemoved = function(event){
 	var node = this.getRootDomNode() ;
 	var attributeName = event.getName() ;

Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js Fri Jun 29 17:10:05 2007
@@ -54,7 +54,6 @@
 
 /**
  *  The string <code>dojo.widget.createWidget</code> will use to create our peer color-palette.
- *  @see xap.bridges.dojo.DojoWidgetBridge#createPeer
 **/ 
 xap.bridges.dojo.DojoColorPaletteBridge.prototype.getPeerString = function(){
 	return "ColorPalette" ;

Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoWidgetBridge.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoWidgetBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoWidgetBridge.js Fri Jun 29 17:10:05 2007
@@ -19,39 +19,27 @@
 
 Xap.provide("xap.bridges.dojo.DojoWidgetBridge");  
 Xap.require("xap.bridges.basic.AbstractWidgetBridge"); 
-// Auto-added---o.k.?
 Xap.require("xap.util.Exception");
 Xap.require("dojo.widget.HtmlWidget");
 Xap.require("xap.widgets.dojo.HtmlWrapper");
 
-// Auto-added---o.k.?
-Xap.require("xap.util.ArrayHelper");
-
- 
- /**
- * @fileoverview
- * 
- * A superclass for the bridges controlling a dojo widget peer; treat it
- * as an abstract superclass.
- */
- 
  
- /**
+  
+/**
  * Creates a xap.bridges.dojo.DojoWidgetBridge.
  * 
- * 
- * @class xap.bridges.dojo.DojoWidgetBridge is the bridge between an XML element
- * representing a control and a subclass of DojoWidget. This class 
- * is typically not used directly but is extended by other classes 
- * for its subclasses.
- * 
- * @author jmargaris
- * @author mturyn
+ * @class A base class for bridges that use dojo widgets as peer objects.
+ *
+ * @constructor
  */
 xap.bridges.dojo.DojoWidgetBridge =  function() {
 	xap.bridges.basic.AbstractWidgetBridge.call( this );
 }
 
+//SETUP SUBCLASS does this but we need this for doc to pick it up correctly
+xap.bridges.dojo.DojoWidgetBridge.prototype = new xap.bridges.basic.AbstractWidgetBridge();
+
+
 Xap.setupClassAsSubclassOf(
 	"xap.bridges.dojo.DojoWidgetBridge",
 	"xap.bridges.basic.AbstractWidgetBridge"
@@ -61,9 +49,14 @@
 
 
 /**
- * 
- * @return an object mapping allowed initial
- * XAL properties to their Dojo equivalents
+ * Returns an object mapping initial XAL properties
+ * to their dojo equivalents. By default this
+ * does the following:<br>
+ * <code>return {id:"widgetId"} ;</code><br>
+ * This maps the XAL "id" attribute to the dojo
+ * "widgetId" attribute. When an attribute is initially set
+ * on an XML element, this map defines what initial dojo property
+ * that attribute maps to.
  */
  xap.bridges.dojo.DojoWidgetBridge.prototype.getXalToToolkitMapper = function(){
  	return {id:"widgetId"} ;
@@ -72,9 +65,8 @@
 
 
 /**
- * 
- * @return an object mapping allowed initial
- * XAL properties to their Dojo equivalents
+ * Overrides the base-class method to call <code>destroy()</code>
+ * on the dojo peer widget.
  */
  xap.bridges.dojo.DojoWidgetBridge.prototype.unload = function(){
  	xap.bridges.basic.AbstractWidgetBridge.prototype.unload.call(this);
@@ -90,6 +82,7 @@
  *	but could be used otherwise as needed.
  *  @see  xap.bridges.dojo.MenuBridge
  *	@see xap.bridges.dojo.DojoWidgetBridge#obtainPeer
+ * @private
 **/
 xap.bridges.dojo.DojoWidgetBridge.prototype.getDefaultPropertyMap = function() {
 	return {} ;
@@ -97,13 +90,8 @@
 
 
  /**
- * 
- * Since the <code>dojo.widget.createWidget()</code> 
- * is good at creating a widget into the place in a DOM previously 
- * occupied by an HTML element, we first create a vanilla
- * <code>&lt;DIV/&gt;</code> to be swapped-out with the widget's containing DIV.
- * We get the string Dojo will use to locate the widget to create from 
- * the subclass' <code>this.getPeerString()</code>. 
+ * Creates a dojo widget and calls <code>setPeer()</code>
+ * with that widget.
  */
 xap.bridges.dojo.DojoWidgetBridge.prototype.obtainPeer = function() {
         
@@ -148,35 +136,15 @@
 }
 
 
-//TODO this is never used right now, do we really
-//want this functionality or what?
-xap.bridges.dojo.DojoWidgetBridge.prototype.addPeerToParent = function(){
-	var parent = this.getElement().getParent();
-	var parentHandler = this.getUiContentHandler().getHandlerForElement( parent );
-	var parentPeerNode = null ;
-	var parentPeer = parentHandler.getPeer();
-		
-	var htmlContainerNode = this.getSpecifiedDisplayNode();
-		
-	if (htmlContainerNode){
-	   htmlContainerNode.appendChild(this.getPeer().getRootDomNode()) ; 	 
-	}
-	else if (parentHandler.addChild){
-		parentHandler.addChild(this);
-	}
-	else{
-		throw new xap.util.Exception(
-				"Problem inserting component managed by "
-				+ this.toString()
-				+ " into a container managed by " 
-				+ parentHandler.toString()
-				+ "; parent doesn't have a suitable container.") ;		
-		}
-}
-
 //IMPORTANT we should really add to the parent AFTER we go through the 
 //intial attributes and children, for efficiency among other reasons
 
+/**
+ * Overridden to call <code>addChild()</code> on the dojo
+ * widget peer with the appropriate index. If the child being added is 
+ * not itself a dojo widget, this method will wrap that child in a dojo
+ * widget.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.addChild = function(childHandler, index){
 	
 	//index -1 just append!
@@ -193,6 +161,7 @@
  * because Dojo widgets like to have other dojo widgets added to them.
  * If the thing being added is NOT a dojo widget then we wrap it in one
  * and do some bookkeeping.
+ * @private
  */
 xap.bridges.dojo.DojoWidgetBridge.prototype.getDojoWidgetPeer = function( childHandler ){
 	if (childHandler._dojoWrapper){
@@ -216,6 +185,9 @@
 }
 
 
+/**
+ * Overridden to call <code>removeChild()</code> on the dojo widget peer.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.removeChild = function(childHandler){
 	var childPeer = this.getDojoWidgetPeer(childHandler);
 	if (!childPeer){
@@ -232,6 +204,7 @@
  *  @param propertyMap A JS object holding name/value pairs
  *  @param holder An object holding an array of attribute nodes (in an "attributes" member) 
  *                produced by the parser/handler.
+ * @private
 **/ 
 xap.bridges.dojo.DojoWidgetBridge.prototype.mapAllowedInitialPropertiesFromXalToDojo = function(propertyMap,attrHolder){
 	var arrAttributes = attrHolder.attributes
@@ -269,32 +242,17 @@
 
 
 /**
- * A dojo widget's "domNode' seems the likeliest candidate for
- * the node to be appended to a parent DOM node; it seems
- * to generally wrap the entire widget.
-**/ 
+ * Overridden to return the "domNode" property on the 
+ * dojo widget peer.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.getRootDomNode = function(){
 	return this._peer.domNode;
 } 
 
 
 /**
- * All bridges to should go through these steps:
- * <ol>
- * <li>: Create or obtain the peer object
- * <li>: Handle all the initial attributes
- * <li>: Recursively parse the inititial children
- * </ol>
-* Here we look at the layout rectangle (if any) as defined by the XAL-spec'd <code>{x,y,width,height}</code>
- * parameters, and add this information to <code>this._creationProperties</code>
- * for the subclasses to do with as they will.&nbsp; Then superclass <code>createPeer</code>
- * (see below) and attribute- and children-parsing routines called, but
- * these latter two shouldn't need to be
- * changed from their implementations in <code>xap.taghandling.AbstractTagImpl</code>
- * and <code>xap.bridges.dojo.DojoWidgetBridge</code>.</li>
- * @see xap.session.ClientSession#_createInitialDocument
- * 
-**/ 
+ * Overridden to perform some dojo-specific initialization.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.init = function() {
 	// Take basic layout-rectangle properties, if any, from the .xal file:
 	var mapper = new Object() ;
@@ -317,13 +275,18 @@
 
 
 /**
- * Add this widget's needs to the superclass' more general list:
-**/
+ * Overridden to return an empty array; DojoWidgetBridge does not
+ * expose any new attributes, although it does override some
+ * attribute setter methods.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.getNewAllowedAttributes = function(){
 	return [];
 }	
 
-/** XML attribute set method for "visible" - override of AbstractWidgetBridge  */
+/**
+ * Overridden to call <code>show()</code> and <code>hide()</code>
+ * on the dojo widget peer.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.setVisibleAttribute = function(value){
 	if ((value == "true") && this.getPeer().show){
 		this.getPeer().show();
@@ -333,7 +296,10 @@
 	}
 }
 
-/** XML attribute set method for "width" */
+/**
+ * Overridden to call <code>onResized()</code> on the dojo widget peer
+ * after setting the width.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.setWidthAttribute = function(value){
 	this.getRootDomNode().style.width = value ;
 	if (this.getPeer().onResized){
@@ -341,7 +307,10 @@
 	}
 }
 
-/** XML attribute set method for "height" */
+/**
+ * Overridden to call <code>onResized()</code> on the dojo widget peer
+ * after setting the height.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.setHeightAttribute = function(value){
 	this.getRootDomNode().style.height = value ;
 	if (this.getPeer().onResized){
@@ -349,10 +318,13 @@
 	}
 }
 
-
+/**
+ * Overridden to return the dojo widget bridge "containerNode" property
+ * if the dojo widget is a container.
+ */
 xap.bridges.dojo.DojoWidgetBridge.prototype.getNodeForChildren = function(){  
 	if (this.getPeer().isContainer){
-		return this.containerNode;
+		return getPeer().containerNode;
 	}
 	return null;
 } 

Modified: incubator/xap/trunk/codebase/src/xap/data/DataFramework.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/DataFramework.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/DataFramework.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/DataFramework.js Fri Jun 29 17:10:05 2007
@@ -37,8 +37,11 @@
 
 
 /**
+ * This constructor is called when the data plugin is loaded and
+ * should never be called directly.
+ * 
+ * @class This class can be used to get data-related containers.
  * @constructor
- * @param sess{ClientSession}
  *
 **/
 xap.data.DataFramework = function(sess) {
@@ -64,11 +67,11 @@
 
 
 /**
- * this.get the data service associated with the session.
- * 
- * @param sess{ClientSession} The session.
+ * Returns the DataService associated with the 
+ * given session.
  * 
- * @return The data service.
+ * @param {xap.session.ClientSession} sess The client session.
+ * @type {xap.data.DataFramework}
  */
 xap.data.DataFramework.getDataService = function (sess) {
 	/*DataFramework*/
@@ -92,6 +95,7 @@
  * Returns the binding resolver for the data service.
  * 
  * @return {xap.data.controller.BindingResolver} The binding resolver.
+ * @private
  */
 xap.data.DataFramework.prototype.getBindingResolver = function () {
 	return this._bindingResolver;
@@ -101,15 +105,19 @@
  * Set the binding resolver for the data service.
  * 
  * @param {xap.data.controller.BindingResolver} b The binding resolver
+ * @private
  */
 xap.data.DataFramework.prototype.setBindingResolver = function (b) {
 	this._bindingResolver = b;
 };
 
 /**
- * Returns the binding container for the data service.
+ * Returns the container that holds binding objects, this is the
+ * equivalent of getting the container named "binding" from
+ * the ClientSession object.
  * 
  * @return {xap.session.Container} The binding container.
+ * @private
  */
 xap.data.DataFramework.prototype.getBindingContainer = function () {
 	return this._bindingContainer;
@@ -119,6 +127,7 @@
  * Returns the binding container for the data service.
  * 
  * @return {xap.data.controller.IteratorContainerImpl} The iterator container.
+ * @private
  */
 xap.data.DataFramework.prototype.getIteratorContainer = function () {
 	return this._iteratorContainer;
@@ -126,7 +135,10 @@
 
 
 /**
- * Returns the formatter container for the data service.
+ * Returns the container that holds 
+ * <code>xap.data.formatter.AbstractFormatter</code> objects, this is the
+ * equivalent of getting the container named "formatter" from
+ * the ClientSession object.
  * 
  * @return {xap.session.Container} The formatter container.
  */
@@ -135,15 +147,20 @@
 };
 
 /**
- * Returns the data source container for the data service.
+ * Returns the container that holds 
+ * <code>xap.data.datasource.AbstractDataSource</code> objects, this is the
+ * equivalent of getting the container named "dataSource" from
+ * the ClientSession object.
  * 
- * @return {xap.session.Container} The data source container.
+ * @return {xap.session.Container} The dataSource container.
  */
 xap.data.DataFramework.prototype.getDataSourceContainer = function () {
 	return this._dataSourceContainer;
 };
 
-
+/**
+ * @private
+ */
 xap.data.DataFramework.prototype.removedFromContainer = function () {
 	this._bindingContainer.destroy();
 	this._formatterContainer.destroy();
@@ -155,7 +172,7 @@
 
 
 /**
- * @public 
+ * @private
  * @param bindString{String}---optional
  * @param select{String}  A selection string.
  * @return {Object}
@@ -187,7 +204,9 @@
 
 
 
-
+/**
+ * @private
+ */
 xap.data.DataFramework.prototype.bind = function( stringOrBinding){
 	if ( typeof stringOrBinding == "string"){
 		var binding =  this._bindingResolver.createBindingFromParameterString(stringOrBinding, this.getDataSourceContainer(), this.getFormatterContainer());
@@ -198,6 +217,9 @@
 	}
 }
 
+/**
+ * @private
+ */
 xap.data.DataFramework.prototype.bindBinding = function ( binding ) {
 		/*ClientEvent*/
 		var event =  this._session.getResolutionHandler()._clientEvent;
@@ -215,8 +237,4 @@
 		
 		//IMPORTANT binding a text node needs to work!
 	//	return binding.resolve(info.getSourceElement(),info.getTextNode(),info.getNodeIndex());	
-}
-
-
-
-
+}
\ No newline at end of file

Modified: incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js Fri Jun 29 17:10:05 2007
@@ -396,10 +396,11 @@
 	return this._source;
 };
 
+
+// TODO make this take a netservice listener that the user can specify
+
+
 /**
- * 
- * TODO make this take a netservice listener that the user can specify
- * 
  * Asynchronously loads a source object from a server URL. When the loading is complete
  * the data source will refresh and any bindings will re-resolve.
  * 
@@ -464,6 +465,7 @@
 /**
  * Returns the logger used to log DataSource issues.
  * @returns {xap.log.Logger} The logger used to log DataSource issues.
+ * @private
  **/
 xap.data.datasource.AbstractDataSource.prototype.getLog = function () {
 	return xap.log.Logger.getLogger("DataSource");

Modified: incubator/xap/trunk/codebase/src/xap/macro/Macro.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/macro/Macro.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/macro/Macro.js (original)
+++ incubator/xap/trunk/codebase/src/xap/macro/Macro.js Fri Jun 29 17:10:05 2007
@@ -28,23 +28,21 @@
  * @param {xap.session.ClientSession} session The client session.
  * @constructor
 
- * @class A macro is a segment of stored xml that can be run oncommand as if 
- * it came from the server. xap.macro.Macros should support arguments via something
- * like java MessageFormat but these don't yet.
- * A macro is a segment of stored xml that can be run from the client
- * as if it came from the server in a retrieveAndProcess().  Macros are obtained by 
- * using the following process. <br><br>
+ * @class A macro is a segment of stored xml based
+ * on <code>xap.util.MessageFormat</code> that can be run from the client
+ * as if it came from the server in a retrieveAndProcess(). A macro can
+ * be run by Javascript code via the following:<br>
  *
  * <code>
- * &lt;xap.application.Application&gt;.getSession().getMacroContainer().getMacro("myMacro").execute();
+ * getSession().getMacroContainer().getMacro("myMacro").execute();
  * </code>
  * <br><br>
  * Macros can also be executed declaritively in component event handlers.<br><br>
- * <code>&lt;button onCommand="macro:myMacro.execute()"/&gt;<br><br>
+ * <code>&lt;button onCommand="macro:myMacro.execute()"/&gt;</code><br><br>
  * 
  * <b>Defining a Macro</b><br>
  *
- *<pre>
+ *<pre><code>
  *	&lt;macro:macro id="mymacro"&gt;
  *		&lt;xm:modifications&gt;
  *			&lt;xm:append select="id('myPanel')"&gt;
@@ -52,17 +50,16 @@
  *   		&lt;/xm:append&gt;
  *		&lt;/xm:modifications&gt;
  *	&lt;/macro:macro&gt;
- *</pre>
+ *</code></pre>
  * <br><br>
- * In the sample above the text="{0}" says that this macro will be parameterized. To
- * change the value of the {0} pass in a value want into the execute("Hello") method.
- *
- * <br><br>
- * @author jmargaris 
+ * The macro above is parameterized. Passing a string into the <code>execute()</code>
+ * method will fill in the <code>{0}</code> message format placeholder.
  * 
  */
 xap.macro.Macro = function( macroText, session ) {
+	/** @private */
 	this._macroText = macroText;
+	/** @private */
 	this._session = session;
 }
 
@@ -73,10 +70,11 @@
 //-----------------------------------------------------------------------
 // Public Methods.
 //-----------------------------------------------------------------------
+
 /**
- * Method is used to create execute a macro.  A variable list of parameters
- * can be supplied to the execute method.  The parameters will be used
- * in the creation of the parameterized macro.
+ * Can be called from Javascript code or from an XML event handler. Parameters
+ * supplied to the <code>execute()</code> method will be plugged into the
+ * message format.
  */
 xap.macro.Macro.prototype.execute = function() {
 	

Modified: incubator/xap/trunk/codebase/src/xap/requestservice/HttpRequest.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/requestservice/HttpRequest.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/requestservice/HttpRequest.js (original)
+++ incubator/xap/trunk/codebase/src/xap/requestservice/HttpRequest.js Fri Jun 29 17:10:05 2007
@@ -31,20 +31,39 @@
  * @method Method is either "POST" or "GET"
  */
 xap.requestservice.HttpRequest = function(url, method) {
-  this._url = url;
-  this._method = method || 'GET'; /* default is GET */
-  this._headers = {};
-  this._content = null;
-}
-
+	/** @private */
+	this._url = url;
+	/** @private */
+	this._method = method || 'GET'; /* default is GET */
+	/** @private */
+	this._headers = {};
+	/** @private */
+	this._content = null;
+}
+
+/**
+ * Sets a header on the outgoing request object.
+ * 
+ * @param {String} name The name of the header.
+ * @param {String} value The value of the header.
+ */
 xap.requestservice.HttpRequest.prototype.setRequestHeader = function(name, value) {
   this._headers[name] = value;
 }
 
+/**
+ * Gets the value of a header on the outgoing request object.
+ * 
+ * @param {String} name The name of the header.
+ * @type {String}
+ */
 xap.requestservice.HttpRequest.prototype.getHeader = function(name) {
   return this._headers[name] || '';
 }
 
+/**
+ * Returns an array of header names on the outgoing request object.
+ */
 xap.requestservice.HttpRequest.prototype.getHeaderNames = function() {
   var headerNames = Array();
   for (var i in this._headers) {
@@ -53,26 +72,48 @@
   return headerNames;
 }
 
+/**
+ * Sets the content body of the outgoing request object.
+ */
 xap.requestservice.HttpRequest.prototype.setContent = function(content) {
   this._content = content;
 }
 
+/**
+ * Returns the content body of the outgoing request object.
+ */
 xap.requestservice.HttpRequest.prototype.getContent = function() {
   return this._content;
 }
 
+/**
+ * Sets the request method on the outgoing request object.
+ * @param {String} method A string with the value of "GET" or "POST"
+ */
 xap.requestservice.HttpRequest.prototype.setRequestMethod = function(method) {
   this._method = method;
 }
 
+/**
+ * Returns the request method on the outgoing request object,
+ * a value of "GET" or "POST" if set.
+ */
 xap.requestservice.HttpRequest.prototype.getRequestMethod = function() {
   return this._method;
 }
 
+/**
+ * Sets the uri on the outgoing request object.
+ * @param {String} uri The uri to send the request object to.
+ */
 xap.requestservice.HttpRequest.prototype.setUri = function(uri) {
   this._url = uri;
 }
 
+/**
+ * Returns uri on the outgoing request object.
+ * @return uri to send the request object to.
+ */
 xap.requestservice.HttpRequest.prototype.getUri = function() {
   return this._url;
 }

Modified: incubator/xap/trunk/codebase/src/xap/session/ClientEvent.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/session/ClientEvent.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/session/ClientEvent.js (original)
+++ incubator/xap/trunk/codebase/src/xap/session/ClientEvent.js Fri Jun 29 17:10:05 2007
@@ -17,20 +17,39 @@
  *
  */
  
-
-//Let Dojo know what to expect from this file:
 Xap.provide('xap.session.ClientEvent'); 
 
 
- /**
- * Placeholder functionality only for now. We just set/get properties
- * on this object for each event
+/**
+ * Constructs a new ClientEvent object.
+ * 
+ * @class ClientEvent exposes properties specific to individual
+ * events. For example, on a mouse event a ClientEvent object will
+ * expose "x" and "y" properties. A ClientEvent object can be passed
+ * to a Javascript event-handling function like the following:
+ * <pre><code>
+ * &lt;button onCommand="mco:myMco.do(event)" /&gt;
+ * </code></pre>
+ * This will call the method <code>do()</code> on the mco "myMco" with
+ * the ClientEvent as the first parameter.
+ * 
+ * @param source The source of the client event, typically
+ * an XML elmenent.
+ * @param {xap.session.ClientSession} The client session.
+ * @constructor
  */
 xap.session.ClientEvent = function( source, session ) {
+	/** The source of the event, usually an XML element. */
 	this.source = source;
+	
+	/** The ClientSession */
 	this.session = session;
 }
 
+/**
+ * Returns a string representation of the ClientEvent.
+ * @type String
+ */
 xap.session.ClientEvent.prototype.toString = function(){
 	var returnValue = "xap.session.ClientEvent:"
 	for (var i in this){

Modified: incubator/xap/trunk/codebase/src/xap/session/EventHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/session/EventHandler.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/session/EventHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/session/EventHandler.js Fri Jun 29 17:10:05 2007
@@ -38,16 +38,27 @@
  * @author Jmargaris
  */
 
-//-----------------------------------------------------------------------
-// Constructors.
-//-----------------------------------------------------------------------
+
+/**
+ * Called automatically by framework.
+ * @constructor
+ * 
+ * @class EventHandler is used to fire event handlers specified
+ * in XML.
+ */
 xap.session.EventHandler = function( session ) {
+	
+	/** @private */
 	this._session = session;
 }
 
-//-----------------------------------------------------------------------
-// Public Methods.
-//-----------------------------------------------------------------------
+/**
+ * Fires an XML specified event.
+ * @param {String} eventName The name of the event, for example "onCommand".
+ * @param {String} eventValue The text of the event handler, for example "mco:myMco.do()".
+ * @param {xap.xml.dom.XapElement} eventElement The element the event was specified on.
+ * @param {xap.session.ClientEvent} clientEvent The client event with event-specific properties.
+ */
 xap.session.EventHandler.prototype.fireEvent = function( eventName, eventValue, 
 											 eventElement, clientEvent ) {
 	
@@ -101,14 +112,15 @@
 	return null;
 }
 
-xap.session.EventHandler.prototype.requestCompleted = function(){
-	
-}
+/** @private */
+xap.session.EventHandler.prototype.requestCompleted = function(){}
 
+/** @private */
 xap.session.EventHandler.prototype.requestFailed = function(url, response, error ){
 	this._session.handleException(error);
 }
 
+/** @private */
 xap.session.EventHandler.prototype._handleObjectEvent = function( eventValue, eventElement, clientEvent){
 	var openParenPos = eventValue.indexOf("(");
 	var closeParenPos = eventValue.indexOf(")");
@@ -132,6 +144,7 @@
  * Return true if the event string is an object event. An object event
  * is string that begins with CONTAINER_NAME:, where container name
  * is the name of a container in the client session.
+ * @type Boolean
  */
 xap.session.EventHandler.prototype.isObjectEvent = function( eventString ) {
 	var colonIndex = eventString.indexOf(":");
@@ -146,6 +159,7 @@
 /**
  * Return true if the event string is a javascript event like:
  * javascript:alert('hello');
+ * @type Boolean
  */
 xap.session.EventHandler.prototype.isJavascriptEvent = function( eventString ) {
 	return eventString.indexOf("javascript:")==0;
@@ -153,7 +167,9 @@
 
 /**
  * Return true if the event string is a server-side event like:
- * ../myPage.jsp
+ * ../myPage.jsp. Any event that is not a javascript or object event
+ * is considered a URL event.
+ * @type Boolean
  */
 xap.session.EventHandler.prototype.isUrlEvent = function( eventString ) {
 	return !this.isJavascriptEvent(eventString) && !this.isObjectEvent(eventString);

Modified: incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/codebase/src/xap/taghandling/AbstractTagImpl.js Fri Jun 29 17:10:05 2007
@@ -39,6 +39,7 @@
 /**
  * Creates a new AbstractTagImpl, this is typically called by the parsing
  * framework and should not be called directly by other code.
+ * @constructor
  * 
  * @class The base class for all user-defined tag-handling classes.
  * <br><br>
@@ -77,14 +78,13 @@
  * It is possible for a single tag-handler to handle an entire subtree of 
  * elements. In this case the tag-handler can add itself as an AttributeChangeListener
  * and/or StructureChangeListener on each element in the controlled subtree.
- * 
- * @author ikaplansky
- * @author jmargaris
  */
-
 xap.taghandling.AbstractTagImpl = function() {
+	/** @private */
 	this._element = null;
+	/** @private */
 	this._peer = null;
+	/** @private */
 	this._clientSession = null;
 }
 
@@ -94,15 +94,14 @@
 //document the entire trail is in place. That should be more efficient
 //in many cases but it has some issues: dojo widgets don't size well
 //and the user won't see anything on screen until the very end
+//TODO just remove this and change code to always work as in the false case
+/** @private */
 xap.taghandling.AbstractTagImpl.TAIL_RECURSION = false;
 
-//-----------------------------------------------------------------------
-// Public Methods.
-//-----------------------------------------------------------------------
-
 
 /**
- * Returns the element this tag mapped to.
+ * Returns the element this tag maps to.
+ * @type xap.xml.dom.XapElement
  */
 xap.taghandling.AbstractTagImpl.prototype.getElement = function() {
 	return this._element;
@@ -112,7 +111,8 @@
  * Sets the element this tag maps to, this is called during the
  * automatic intiliazation process.
  * 
- * @param e The element this tag maps to.
+ * @param el The element this tag maps to.
+ * @private
  */
 xap.taghandling.AbstractTagImpl.prototype.setElement = function( el, addEvent ) {
 	this._element = el;
@@ -123,13 +123,24 @@
 }
 
 /**
- * Returns the object that this bridge controls.
+ * Returns the object that this bridge controls, typically the physically
+ * representation of the XML element.
  */
 xap.taghandling.AbstractTagImpl.prototype.getPeer = function() {
 	return this._peer;
 }
 
 /**
+ * Sets the object that this bridge controls.
+ */
+xap.taghandling.AbstractTagImpl.prototype.setPeer = function( obj ){
+	this._peer = obj;
+	
+	//TODO move this into document handler? safer
+	this.getUiContentHandler().setHandlerForPeer( obj, this);
+}
+
+/**
  * Subclasses should override this method to provide proper initialization
  * behavior. This is the final call in the tag-handler creation process.
  */
@@ -144,27 +155,11 @@
 	//	7. move childAdded that passes in the event and handler
 }
 
-
-//-----------------------------------------------------------------------
-// Protected Methods.
-//-----------------------------------------------------------------------
-
 /**
- * Sets the object that this bridge controls.To use
- * <code>UiContentHandler.getHandlerForPeer()</code> it is not enough
- * to call this method, the developer must also call
- * <code>UiContentHandler.setHandlerForPeer()</code>. This call is made 
- * automatically in ContainerBridge but classes that extend xap.taghandling.AbstractTagImpl 
- * directly must call them themselves if they need the ability to do the peer 
- * to handler lookup.
+ * Performs cleanup when the XML element this bridge maps to is removed
+ * from its owner document. Subclasses should override this method
+ * to perform more specific cleanup behavior.
  */
-xap.taghandling.AbstractTagImpl.prototype.setPeer = function( obj ){
-	this._peer = obj;
-	
-	//TODO move this into document handler? safer
-	this.getUiContentHandler().setHandlerForPeer( obj, this);
-}
-
 xap.taghandling.AbstractTagImpl.prototype.unload = function(  ){
 	
 	//TODO move this into document handler? safer
@@ -174,7 +169,8 @@
 }
 
 /**
- * @return The UI document
+ * Returns the UI document.
+ * @type xap.xml.dom.Document
  */
 xap.taghandling.AbstractTagImpl.prototype.getUiDocument = function() {
 	return this.getSession().getDocumentContainer().getUiDocument();
@@ -345,19 +341,6 @@
 
 
 /**
- * Returns the URL context for the current thread. The URL context can be
- * used to translate relative URLs into non-relative URLs. For example,
- * if the page MYAPP/pages/myPage.jsp contains onCommand="pages2/anotherPage.xml",
- * the URL context is "MYAPP/pages/" and the onCommand should refer to
- * "MYAPP/pages/pages2/anotherPage.xml"
- * 
- * @return The URL context of the current thread, which can be null.
- */
-xap.taghandling.AbstractTagImpl.prototype.getUrlContext = function() {
-	return this.getSession().getUrlContext();
-}
-
-/**
  * This method is used to fire an event in a standard manner.
  * The ClientEvent encapsulates any extra info in the event. The eventValue
  * should be something like "mco://myMco.do()" or "mypage.jsp".
@@ -368,7 +351,6 @@
  * @param eventValue The value of the event, like "mco://myMco.do()"
  * @param eventElement The element the event is registered on
  * @param clientEvent The ClientEvent that contains any extra information - may be null.
- * @return TODO
  */
 xap.taghandling.AbstractTagImpl.prototype.fireEvent = function( eventName, eventValue, eventElement,
 												clientEvent ) {
@@ -491,9 +473,6 @@
 	this.getElement().addAttributeChangeListener(this);
 }
 	
-	
-	
-	
 
 /**
  * This method is called by onAttributeSet(), which catches any AttributeConversioExceptions
@@ -507,23 +486,24 @@
 	// NO-OP
 }
 
-
+/** @private */
 xap.taghandling.AbstractTagImpl.prototype.onChildAdded = function( e ) {
 	if (xap.taghandling.AbstractTagImpl.TAIL_RECURSION){
 		this.childAdded(e);
 	}
 }
 
-xap.taghandling.AbstractTagImpl.prototype.childAdded = function( e ) {
-
-}
-
-
-
 /**
- * This method is included to conform to the StructureChangeListener interface.
- * @param e The StructureChangeEvent
+ * Subclasses should override this to provide custom behavior,
+ * the default behavior is a no-op.
+ * 
+ * @param {xap.dom.events.StructureChangeEvent} A StructureChangeEvent
+ * representing the addition of a new child XML element.
  */
+xap.taghandling.AbstractTagImpl.prototype.childAdded = function( e ) {}
+
+
+/** No-op implementation of StructureChangeListener */
 xap.taghandling.AbstractTagImpl.prototype.beforeChildAdded = function( e ) {
 
 //IMPORTANT need this to work for binding text nodes
@@ -554,7 +534,7 @@
 //		}
 }
 	
-
+/** No-op implementation of StructureChangeListener */
 xap.taghandling.AbstractTagImpl.prototype.beforeChildRemoved = function( e ) {}
 
 
@@ -611,13 +591,8 @@
  */
 xap.taghandling.AbstractTagImpl.prototype.onAttributeRemoved = function( e ) {}
 
-/**
- * If an attribute change event looks like xyz:blah,
- * tries to resolve "blah" in the "xyz" namespace.
- * Subclasses may do n=more, but they definitely should 
- * do this.
- * @param event{xap.xml.dom.events.AttributeChangeEvent}
- * @throw exception if resolver has a problem parsing the new event's value 
+/** Implementation of AttributeChangeListener, performs resolution
+ * of the {...} syntax.
  */
 xap.taghandling.AbstractTagImpl.prototype.beforeAttributeSet = function( event ){	
 	var resolver  = this.getSession().getResolutionHandler() ;
@@ -668,12 +643,17 @@
     return exception;
 }
 
+/**
+ * Returns the ClientSession
+ * @type xap.session.ClientSession
+ */
 xap.taghandling.AbstractTagImpl.prototype.getSession = function() {
 	return this._clientSession;
 }
 
 /**
  * Called during initialization process.
+ * @private
  */
 xap.taghandling.AbstractTagImpl.prototype.setSession = function( session ) {
 	this._clientSession = session;

Modified: incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js (original)
+++ incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js Fri Jun 29 17:10:05 2007
@@ -41,16 +41,13 @@
  * with a rename). This class is responsible for parsing a plugin mapping file
  * and setting up the proper mappings. A plugin mapping file defines
  * tags that map to classes. Each entry applies to a single namespace
- * and to a single document. For example, the <button> tag would apply
+ * and to a single document. For example, the &lt;button&gt; tag would apply
  * to the UI namespace and the UI document. Using button without the UI namespace
  * or outside of the UI document would have no effect.
  * 
  * It is also possible to have a tag map to no class. That way we will not
  * report the tag as unrecognized.
  */
-
-
-
 xap.taghandling.PluginRegistryImpl = function( session ){
 	this._pluginLifecycleObjects = [];
 	this._tagDefinitions = new xap.util.Hashtable();
@@ -300,6 +297,7 @@
 xap.taghandling.PluginRegistryImpl.prototype.toString = function(){
 	return this._tagMappings.toString();
 };
+
 /**
  * @param {String} tagName The name of the tag
  * @param {Object} className The name of the class or the special NO_MAPPED_CLASS object
@@ -323,9 +321,6 @@
 		this._tagLocations.put(hashKey,pluginFileUrl.substring(0, pluginFileUrl.lastIndexOf('/')));
 	}
 };
-
-
-
 
 
 xap.taghandling.PluginRegistryImpl._createHashtableKey = function(tagName, nameSpace, documentName){

Modified: incubator/xap/trunk/codebase/src/xap/util/ArrayHelper.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/ArrayHelper.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/ArrayHelper.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/ArrayHelper.js Fri Jun 29 17:10:05 2007
@@ -27,14 +27,14 @@
  
 /**
  * ArrayHelper should never be constructed.
+ * @constructor
  * 
  * @class ArrayHelper provides methods to implement some common
- * functions missing on arrays. (At least in some JS versions)
+ * utility functions on arrays.
  * This is intended to be simpler and more straightforward
  * than either wrapping an array in a new data structure
  * or changing the array prototype.
  * 
- * @constructor
  */
 xap.util.ArrayHelper = function(){}
 
@@ -144,6 +144,7 @@
  * future version of the script language....
  * @param {Array} array The array to which to add.
  * @return {Array} The altered[?] array, so we can chain this.
+ * @private
  */ 
 xap.util.ArrayHelper.unique = function( arr ){
 	if (!arr ){

Modified: incubator/xap/trunk/codebase/src/xap/util/Character.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/Character.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/Character.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/Character.js Fri Jun 29 17:10:05 2007
@@ -21,7 +21,6 @@
  * @fileoverview Helper class for testing is items are letters,
  *  whitespace, alphanumeric, etc.
  * 
- * @author ikaplansky
  */
 
 Xap.provide("xap.util.Character");
@@ -62,23 +61,42 @@
 //Character.reFloat = /^((\d+(\.\d*)?)|((\d*\.)?\d+))$/;
 //Character.reSignedFloat = /^(((\+|-)?\d+(\.\d*)?)|((\+|-)?(\d*\.)?\d+))$/;
 
-
+/**
+ * Returns true if the argument is a letter.
+ * @type {Boolean}
+ */
 xap.util.Character.isLetter = function ( c ) {
 	return xap.util.Character._reLetter.test( c );
 }
 
+/**
+ * Returns true if the argument is a digit.
+ * @type {Boolean}
+ */
 xap.util.Character.isDigit = function ( c ) {
 	return xap.util.Character._reDigit.test( c );
 }
 
+/**
+ * Returns true if the argument is a letter or digit.
+ * @type {Boolean}
+ */
 xap.util.Character.isLetterOrDigit = function( c ) {
 	return xap.util.Character._reLetterOrDigit.test( c );
 }
 
+/**
+ * Returns true if the argument is a whitespace character.
+ * @type {Boolean}
+ */
 xap.util.Character.isWhiteSpaceChar = function ( c ) {
 	return (c==' ' || c=='\n' || c=='\t' || c=='\r');
 }
 
+/**
+ * Returns true if the argument is a whitespace string.
+ * @type {Boolean}
+ */
 xap.util.Character.isWhiteSpace = function ( str ) {
 	return xap.util.Character._reWhitespace.test( str );
 }

Modified: incubator/xap/trunk/codebase/src/xap/util/EscapeSyntaxParser.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/EscapeSyntaxParser.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/EscapeSyntaxParser.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/EscapeSyntaxParser.js Fri Jun 29 17:10:05 2007
@@ -78,10 +78,9 @@
  * exists for complex parsing operations such as parsing a comma separated
  * list of parameters which may each have different escape sequences.
  * 
- * @param s
- * @param escapeSequenceIndex
- * @return TODO
- * @throws RuntimeException
+ * @param {String} s The string to get the resolved character out of.
+ * @param {int} index The index to get the resolved character out of.
+ * @return {char} A resolved character or UNRESOLVED_CHARACTER.
  */	
 xap.util.EscapeSyntaxParser.prototype.getResolvedCharacter = function( s, index){
 	var c = s.charAt(index);
@@ -117,13 +116,13 @@
 	return xap.util.EscapeSyntaxParser.UNRESOLVED_CHARACTER;
 }
 
-	/**
-	 * Given an unescaped string, convert it into an escaped one that
-	 * fits this escape syntax. For example given the string
-	 * "hello\there" turn it into "hello\\there".
-	 * @param s The string to escape.
-	 * @return A properly escaped string
-	 */
+/**
+ * Given an unescaped string, convert it into an escaped one that
+ * fits this escape syntax. For example given the string
+ * "hello\there" turn it into "hello\\there".
+ * @param s The string to escape.
+ * @return A properly escaped string
+ */
 xap.util.EscapeSyntaxParser.prototype.escape = function( s ){
 	var b = new String();
 	for (var i =0; i<s.length; i++){

Modified: incubator/xap/trunk/codebase/src/xap/util/Exception.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/Exception.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/Exception.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/Exception.js Fri Jun 29 17:10:05 2007
@@ -33,7 +33,7 @@
  * 
  * @class Base class for non-internationalized exceptions
  * 
- * @param message The message
+ * @param {String} message The message
  * @param cause The cause of the message, typically another exception
  */
 xap.util.Exception = function( message, cause, location ) {
@@ -46,10 +46,17 @@
 	return this._location;
 }
 
+/**
+ * Returns the message text of the exception.
+ * @type String
+ */
 xap.util.Exception.prototype.getMessage = function() {
 	return this._message;
 }
 
+/**
+ * Returns the underlying exception that caused this exception.
+ */
 xap.util.Exception.prototype.getCause = function() {
 	return this._cause;
 }

Modified: incubator/xap/trunk/codebase/src/xap/xml/dom/events/StructureChangeEvent.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/xml/dom/events/StructureChangeEvent.js?view=diff&rev=552069&r1=552068&r2=552069
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/xml/dom/events/StructureChangeEvent.js (original)
+++ incubator/xap/trunk/codebase/src/xap/xml/dom/events/StructureChangeEvent.js Fri Jun 29 17:10:05 2007
@@ -19,7 +19,7 @@
 
 /**
  *  @fileoverview xap.xml.dom.events.StructureChangeEvent objects are passed to the methods of the
- * {@link xap.xml.dom.events.StructureChangeListener} class when changes in xap.xml.dom.Document
+ * {@link xap.xml.dom.events.StructureChangeListener xap.xml.dom.events.StructureChangeListener} class when changes in xap.xml.dom.Document
  * structure occur.
  */
 
@@ -35,7 +35,7 @@
  * Creates a new xap.xml.dom.events.StructureChangeEvent
  * 
  * @class xap.xml.dom.events.StructureChangeEvent objects are passed to the methods of the
- * {@link xap.xml.dom.events.StructureChangeListener} class when changes in xap.xml.dom.Document
+ * {@link xap.xml.dom.events.StructureChangeListener xap.xml.dom.events.StructureChangeListener} class when changes in xap.xml.dom.Document
  * structure occur.
  * 
  * @param parent The parent of the xap.xml.dom.XapElement being appended or removed
@@ -67,21 +67,21 @@
 
 //TODO unify these constants with the built-in DOM constants?
 /**
- * If this value is returned from {@link #getType()} then this
+ * If this value is returned from {@link #getType() getType()} then this
  * xap.xml.dom.events.StructureChangeEvent was triggered by the addition or removal of
  * an Element.
  */
 xap.xml.dom.events.StructureChangeEvent.ELEMENT_NODE = 0;
 
 /**
- * If this value is returned from {@link #getType()} then this
+ * If this value is returned from {@link #getType() getType()} then this
  * xap.xml.dom.events.StructureChangeEvent was triggered by the addition or removal of
  * an Text node.
  */
 xap.xml.dom.events.StructureChangeEvent.TEXT_NODE = 1;
 
 /**
- * If this value is returned from {@link #getType()} then this
+ * If this value is returned from {@link #getType() getType()} then this
  * xap.xml.dom.events.StructureChangeEvent was triggered by the addition or removal of
  * the xap.xml.dom.Document root element.
  */
@@ -104,10 +104,10 @@
 
 /**
  * Returns the type of object that triggered this xap.xml.dom.events.StructureChangeEvent.
- * If the return value is {@link #ELEMENT_NODE} then an element was
- * either removed or added, if the return value is {@link #TEXT_NODE} then
+ * If the return value is {@link #ELEMENT_NODE ELEMENT_NODE} then an element was
+ * either removed or added, if the return value is {@link #TEXT_NODE TEXT_NODE} then
  * a text node was either removed or added, if the return value is
- * {@link #ROOT_NODE}, this event was triggered by the setting of the 
+ * {@link #ROOT_NODE ROOT_NODE}, this event was triggered by the setting of the 
  * root element on the xap.xml.dom.Document.
  * 
  * @return A short signifying what type of xap.xml.dom.events.StructureChangeEvent this is.
@@ -118,7 +118,7 @@
 
 /**
  * Returns the object being added or removed.  The return type can either
- * be {@link xap.xml.dom.XapElement} or string (i.e. text node).
+ * be {@link xap.xml.dom.XapElement xap.xml.dom.XapElement} or string (i.e. text node).
  *  
  * @return The object being added or removed.
  */