incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r465155 - /incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js
Date Wed, 18 Oct 2006 06:22:21 GMT
Author: mturyn
Date: Tue Oct 17 23:22:20 2006
New Revision: 465155

URL: http://svn.apache.org/viewvc?view=rev&rev=465155
Log:
Events hooked up via subclassing this to TextField; still seems to be a problem getting input
into more than one line.

Modified:
    incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js

Modified: incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js?view=diff&rev=465155&r1=465154&r2=465155
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js (original)
+++ incubator/xap/trunk/src/xap/widgets/dojo/TextArea.js Tue Oct 17 23:22:20 2006
@@ -15,13 +15,13 @@
  *
  */
  
- //IMPORTANT move this to some shared area
+//IMPORTANT move this to some shared area
 dojo.widget.manager.registerWidgetPackage("xap.widgets.dojo");
 
 Xap.provide("xap.widgets.dojo.TextArea");
 
 dojo.require("dojo.widget.*");
-dojo.require("dojo.widget.HtmlWidget");
+dojo.require("xap.widgets.dojo.TextField");
 dojo.require("dojo.dom");
 dojo.require("dojo.html");
 dojo.require("dojo.style");
@@ -30,27 +30,17 @@
 dojo.widget.tags.addParseTreeHandler("dojo:TextArea");
 
 xap.widgets.dojo.TextArea = function(){
-	dojo.widget.HtmlWidget.call(this);
+	xap.widgets.dojo.TextField.call(this);
+	// These will override the equivalent fields 
+	// that would otherwise be picked up in extend:
+	this.templateString ="<input type=\"textarea\" dojoAttachEvent=\"onchange;onkeyup;\"></input>"
;
+	this.widgetType = "TextArea" ;	
 }
-dojo.inherits(xap.widgets.dojo.TextArea, dojo.widget.HtmlWidget);
+dojo.inherits(xap.widgets.dojo.TextArea, xap.widgets.dojo.TextField);
 
-dojo.lang.extend(xap.widgets.dojo.TextArea, {
-
-	templateString: '<textarea dojoAttachEvent="onblur"></textarea>',
-	templateCssPath: null ,
-	widgetType: "TextArea",
-	isContainer: false,
-	
-	//hook for attach event
-	onblur: function(){
-	},
-	
-	setText: function( text ){
-		this.domNode.value = text;
-	},
-	
-	getText: function(){
-		return this.domNode.value;
-	}
-}
-);
\ No newline at end of file
+// As noted above, the templateString and widgetType have
+// already been set for this constructore, so they won't
+// be reset by the ones for TextField when we mix it in:
+dojo.lang.extend(xap.widgets.dojo.TextArea, 
+					new xap.widgets.dojo.TextField()
+				) ;
\ No newline at end of file



Mime
View raw message