incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r433347 - in /incubator/xap/trunk: WebContent/XapConfig.xml src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js src/xap/bridges/dojo/DojoWidgetBridge.js
Date Mon, 21 Aug 2006 20:22:57 GMT
Author: mturyn
Date: Mon Aug 21 13:22:56 2006
New Revision: 433347

URL: http://svn.apache.org/viewvc?rev=433347&view=rev
Log:
Some methods in the abstract superclass were actually Dojo-specific, so they were move to
the toolkit superclass DojoWidgetBridge.

Modified:
    incubator/xap/trunk/WebContent/XapConfig.xml
    incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js
    incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js

Modified: incubator/xap/trunk/WebContent/XapConfig.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/XapConfig.xml?rev=433347&r1=433346&r2=433347&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/XapConfig.xml (original)
+++ incubator/xap/trunk/WebContent/XapConfig.xml Mon Aug 21 13:22:56 2006
@@ -1,5 +1,5 @@
 <xap-configuration>
-	<log-configuration logging-enabled="true">
+	<log-configuration logging-enabled="false">
 	</log-configuration>
 	
 	<plugins>

Modified: incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js?rev=433347&r1=433346&r2=433347&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js Mon Aug 21 13:22:56
2006
@@ -80,9 +80,7 @@
  * <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 <code>createPeer</code>
+* 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>
@@ -90,30 +88,13 @@
  * 
 **/ 
 xap.bridges.basic.AbstractBlackBoxWidgetBridge.prototype.init = function() {
-	// Take basic layout-rectangle properties, if any, from the .xal file:
-	var mapper = new Object() ;
-	mapper.height = "height" ;
-	mapper.width = "width";	
-	mapper.x = "left" ;	
-	mapper.y = "top" ;	
-
-	this._creationProperties = new Object() ;
-
-	for (var prop in mapper){
-		var xalProp = this.getElement().getAttribute(prop) ;
-		if ( xalProp  &&  ("" + xalProp).length > 0 ){
-			this._creationProperties[ mapper[prop] ] = xalProp ;
-		}
-	}	
 
 
 	this.createPeer();
 	this.parseInitialAttributes( this.getElement() );
 	this.parseInitialChildren( this.getElement() );
 	xap.taghandling.AbstractTagImpl.prototype.init.call( this );
-	if( this.getPeer().show){
-		this.getPeer().show();
-	}
+
 }
 
 /**

Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js?rev=433347&r1=433346&r2=433347&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js Mon Aug 21 13:22:56 2006
@@ -350,8 +350,53 @@
 }
 
 
-
+/**
+ * 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.
+**/ 
 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
+ * 
+**/ 
+xap.bridges.dojo.DojoWidgetBridge.prototype.init = function() {
+	// Take basic layout-rectangle properties, if any, from the .xal file:
+	var mapper = new Object() ;
+	mapper.height = "height" ;
+	mapper.width = "width";	
+	mapper.x = "left" ;	
+	mapper.y = "top" ;	
+
+	this._creationProperties = new Object() ;
+
+	for (var prop in mapper){
+		var xalProp = this.getElement().getAttribute(prop) ;
+		if ( xalProp  &&  ("" + xalProp).length > 0 ){
+			this._creationProperties[ mapper[prop] ] = xalProp ;
+		}
+	}	
+
+	xap.bridges.basic.AbstractBlackBoxWidgetBridge.prototype.init.call(this);
+
+	if( this.getPeer().show){
+		this.getPeer().show();
+	}
+}



Mime
View raw message