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 mt...@apache.org on 2006/08/18 04:18:52 UTC

svn commit: r432485 - /incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js

Author: mturyn
Date: Thu Aug 17 21:18:49 2006
New Revision: 432485

URL: http://svn.apache.org/viewvc?rev=432485&view=rev
Log:
Fixed require()s, improved jsdoc.

Modified:
    incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js?rev=432485&r1=432484&r2=432485&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/DomNodeBridge.js Thu Aug 17 21:18:49 2006
@@ -16,17 +16,11 @@
  */
  
 Xap.provide("xap.bridges.basic.DomNodeBridge"); 
-// Auto-added---o.k.?
-Xap.require("xap.taghandling.AbstractTagImpl");
-
-// Auto-added---o.k.?
-Xap.require("xap.bridges.zimbra.DwtButtonBridge");
-
 Xap.require("xap.bridges.basic.AbstractBlackBoxWidgetBridge") ;
 /**
  * @fileoverview
  * 
- * A bridge class that controls a blob of html.
+ * A bridge class that wrappers an HTMLElement instance.
  */
 
 /**
@@ -60,7 +54,8 @@
 	var parent = this.getElement().getParent();
 	var handler = this.getUiContentHandler().getHandlerForElement( parent );
 	
-	// If we don't have a peer, try to find one:
+	// If we don't already have a peer, try to find one using a standard i.d.
+	// parameter, "wrappedNodeId":
 	if ( !this._peer ) {
     	try {
 			var nodeId = this.getElement().getAttribute("wrappedNodeId")  ;    	
@@ -69,10 +64,8 @@
 			// can also set up handlers.....
     		this.setPeer(peer) ;
         } catch ( e ) {
-        	alert(e);
+			xap.bridges.basic.DomNodeBridge.s_log.error("Problem finding a peer DOM node:\n"+e );
     	}
-	} else {
-		//xap.bridges.zimbra.DwtButtonBridge.s_log.error("Bogus parent peer:" + parentPeer );
 	}
 }
 
@@ -104,6 +97,7 @@
 		} else if( peer.style[setterName]){
 			(peer.style[setterName]).call( peer.style, value) ;
 		} else {
+		// Since the peer is a dom node, this default method is open to us:
 			peer.setAttribute(name,value) ;
 		}
 }
@@ -113,9 +107,9 @@
  *  ---and because we haven't overwritten AbstractBlackBoxWidgetBridge,
  *  this.getDisplayDomNode == this.getRootDomeNode....
 **/
- xap.bridges.basic.DomNodeBridge.prototype.getRootDomNode = function(){
- 	return this.getPeer() ;
- }
+xap.bridges.basic.DomNodeBridge.prototype.getRootDomNode = function(){
+	return this.getPeer() ;
+}
  
 
 /**