incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r446468 - in /incubator/xap/trunk/src/xap: bridges/basic/AbstractBlackBoxWidgetBridge.js bridges/dojo/CellBridge.js taghandling/plugin.xml
Date Fri, 15 Sep 2006 02:24:09 GMT
Author: jmargaris
Date: Thu Sep 14 19:24:08 2006
New Revision: 446468

URL: http://svn.apache.org/viewvc?view=rev&rev=446468
Log:
more table work, no longer use autoattach events by default

Added:
    incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js   (with props)
Modified:
    incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js
    incubator/xap/trunk/src/xap/taghandling/plugin.xml

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?view=diff&rev=446468&r1=446467&r2=446468
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/AbstractBlackBoxWidgetBridge.js Thu Sep 14 19:24:08
2006
@@ -196,7 +196,6 @@
 	// constructor, via a database call, using a JSON-encoded object over the fibre,
 	// or stolen from a fruit-cart:
 	this.obtainPeer() ;
-	this.autoAttachBridgeEventsToPeerEvents() ;
 }
 
 /**
@@ -216,24 +215,6 @@
 	return null;
 }
 
-/**
- * @private
- * A wrapper for firing an <code>onCommand</code> event, here so that we can
hook that
- * up to the peer event specified by <code>getPeerOnCommandEvent</code> q.v..
- * @see getPeerOnCommandEvent
-**/ 
-xap.bridges.basic.AbstractBlackBoxWidgetBridge.prototype._onCommandEvent = function( event
) {
-	this.fireEvent("onCommand");
-}
-
-/**
- *  The name of the native peer event to attach to our <code>onCommand</code>---it
- *  should be a major event for the peer, like <code>onSelect</code>  for a selection
box,
- *  or <code>onSliderMoved</code> for a slider.
-**/ 
-xap.bridges.basic.AbstractBlackBoxWidgetBridge.prototype.getPeerOnCommandEvent = function(){
-	return "onClick" ;	
-} 
 
 
 
@@ -359,9 +340,7 @@
 	}
 	else{
 		
-		//TODO have a strict mode?
-		xap.util.LogFactory.getLog("AbstractWidget").
-			debug("Unrecognized attribute " + name + " on element " + this.getElement().nodeName);
+		//TODO have a strict mode and report some unrecognized atts?
 	}	
 }
 

Added: incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js?view=auto&rev=446468
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js (added)
+++ incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js Thu Sep 14 19:24:08 2006
@@ -0,0 +1,49 @@
+/*
+ * Copyright  2006 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+Xap.provide("xap.bridges.dojo.CellBridge"); 
+Xap.require("xap.bridges.basic.AbstractBlackBoxWidgetBridge");
+
+xap.bridges.dojo.CellBridge = function() {
+	xap.bridges.basic.AbstractBlackBoxWidgetBridge.call(this);
+}
+
+Xap.setupClassAsSubclassOf("xap.bridges.dojo.CellBridge", "xap.bridges.basic.AbstractBlackBoxWidgetBridge");
+
+
+
+xap.bridges.dojo.CellBridge.prototype.obtainPeer = function() {
+
+  this._domNode = document.createElement("span");
+  return this._domNode;
+}
+
+
+xap.bridges.dojo.CellBridge.prototype.getRootDomNode = function() {
+	return this._domNode
+}	
+
+
+xap.bridges.dojo.CellBridge.prototype.getNewAllowedAttributes = function() {
+	return ["text"];
+}	
+
+xap.bridges.dojo.CellBridge.prototype.setTextAttribute = function(text) {
+	this._domNode.innerHTML = text;
+}
+
+

Propchange: incubator/xap/trunk/src/xap/bridges/dojo/CellBridge.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/xap/trunk/src/xap/taghandling/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/plugin.xml?view=diff&rev=446468&r1=446467&r2=446468
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/plugin.xml (original)
+++ incubator/xap/trunk/src/xap/taghandling/plugin.xml Thu Sep 14 19:24:08 2006
@@ -27,9 +27,11 @@
 		<mapping class="xap.bridges.dojo.TableBridge" name="table"/>
 		<mapping class="xap.bridges.dojo.RowBridge" name="row"/>
 		<mapping class="xap.bridges.dojo.ColumnBridge" name="column"/>
+		<mapping class="xap.bridges.dojo.CellBridge" name="cell"/>
+		<mapping class="xap.bridges.dojo.ScrollPaneBridge" name="scrollPane"/>
 		
 		<!-- for now cell just maps to label and header to button -->
-		<mapping class="xap.bridges.xap.LabelBridge" name="cell"/>
+		
 		<mapping class="xap.bridges.xap.ButtonBridge" name="header"/>
 
 	</tag-mappings>



Mime
View raw message