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 2006/09/01 19:28:12 UTC
svn commit: r439432 - in /incubator/xap/trunk/src/xap:
components/dojo/PasswordField.js components/dojo/TextArea.js
taghandling/AbstractTagImpl.js
Author: jmargaris
Date: Fri Sep 1 12:28:12 2006
New Revision: 439432
URL: http://svn.apache.org/viewvc?rev=439432&view=rev
Log:
new widgets and examples
Added:
incubator/xap/trunk/src/xap/components/dojo/PasswordField.js (with props)
incubator/xap/trunk/src/xap/components/dojo/TextArea.js (with props)
Modified:
incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
Added: incubator/xap/trunk/src/xap/components/dojo/PasswordField.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/dojo/PasswordField.js?rev=439432&view=auto
==============================================================================
--- incubator/xap/trunk/src/xap/components/dojo/PasswordField.js (added)
+++ incubator/xap/trunk/src/xap/components/dojo/PasswordField.js Fri Sep 1 12:28:12 2006
@@ -0,0 +1,39 @@
+//IMPORTANT move this to some shared area
+dojo.widget.manager.registerWidgetPackage("xap.components.dojo");
+
+Xap.provide("xap.components.dojo.PasswordField");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.dom");
+dojo.require("dojo.html");
+dojo.require("dojo.style");
+dojo.require("dojo.event");
+
+dojo.widget.tags.addParseTreeHandler("dojo:PasswordField");
+
+xap.components.dojo.PasswordField = function(){
+ dojo.widget.HtmlWidget.call(this);
+}
+dojo.inherits(xap.components.dojo.PasswordField, dojo.widget.HtmlWidget);
+
+dojo.lang.extend(xap.components.dojo.PasswordField, {
+
+ templateString: '<input type="password" dojoAttachEvent="onblur"></input>',
+ templateCssPath: null ,
+ widgetType: "PasswordField",
+ 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
Propchange: incubator/xap/trunk/src/xap/components/dojo/PasswordField.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/xap/trunk/src/xap/components/dojo/TextArea.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/dojo/TextArea.js?rev=439432&view=auto
==============================================================================
--- incubator/xap/trunk/src/xap/components/dojo/TextArea.js (added)
+++ incubator/xap/trunk/src/xap/components/dojo/TextArea.js Fri Sep 1 12:28:12 2006
@@ -0,0 +1,39 @@
+//IMPORTANT move this to some shared area
+dojo.widget.manager.registerWidgetPackage("xap.components.dojo");
+
+Xap.provide("xap.components.dojo.TextArea");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.dom");
+dojo.require("dojo.html");
+dojo.require("dojo.style");
+dojo.require("dojo.event");
+
+dojo.widget.tags.addParseTreeHandler("dojo:TextArea");
+
+xap.components.dojo.TextArea = function(){
+ dojo.widget.HtmlWidget.call(this);
+}
+dojo.inherits(xap.components.dojo.TextArea, dojo.widget.HtmlWidget);
+
+dojo.lang.extend(xap.components.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
Propchange: incubator/xap/trunk/src/xap/components/dojo/TextArea.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js?rev=439432&r1=439431&r2=439432&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js Fri Sep 1 12:28:12 2006
@@ -504,29 +504,27 @@
// }
//
//
-// /**
-// * This method can be used to remove values the document.
-// * For example, if a user deletes all text from a textField and we want the
-// * "text" attribute to reflect the lack of text, we can call
-// * writeBackRemoveAttribute("text").
-// * <br><br>
-// * This will not signal the tag-handler that an attribute has been removed. The assumption
-// * is that the tag-handler is what initiated the write back. Other AttributeChangeListeners
-// * will be called.
-// *
-// * @param name The name of the attribute to remove.
-// */
-// public void writeBackRemoveAttribute(String name){
-// synchronized(getUiDocument().getDomSynchronizationObject()){
-// getElement().removeAttributeChangeListener(this);
-// getElement().removeAttribute(name);
-// getElement().addAttributeChangeListener(this);
-// }
-// }
-//
-//
-//
-//
+/**
+ * This method can be used to remove values the document.
+ * For example, if a user deletes all text from a textField and we want the
+ * "text" attribute to reflect the lack of text, we can call
+ * writeBackRemoveAttribute("text").
+ * <br><br>
+ * This will not signal the tag-handler that an attribute has been removed. The assumption
+ * is that the tag-handler is what initiated the write back. Other AttributeChangeListeners
+ * will be called.
+ *
+ * @param name The name of the attribute to remove.
+ */
+xap.taghandling.AbstractTagImpl.prototype.writeBackRemoveAttribute = function(name){
+ this.getElement().removeAttributeChangeListener(this);
+ this.getElement().removeAttribute(name);
+ this.getElement().addAttributeChangeListener(this);
+}
+
+
+
+
/**
* This method is called by onAttributeSet(), which catches any AttributeConversioExceptions