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/03 19:13:35 UTC
svn commit: r428483 -
/incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js
Author: mturyn
Date: Thu Aug 3 12:13:34 2006
New Revision: 428483
URL: http://svn.apache.org/viewvc?rev=428483&view=rev
Log:
Fixed DatePicker bridge, created ColorPalette bridge in its image.
Both are still deficient in not having a way of getting a value out of their peers....
Modified:
incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js
Modified: incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js?rev=428483&r1=428482&r2=428483&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/DatePickerBridge.js Thu Aug 3 12:13:34 2006
@@ -1,48 +1,48 @@
-/*
- * 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.
- *
+/*
+ * 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.basic.DatePickerBridge");
Xap.require("xap.util.LogFactory");
-Xap.require("xap.bridges.basic.AbstractBlackBoxWidgetBridge");
+Xap.require("xap.bridges.dojo.DojoWidgetBridge");
Xap.require("dojo.widget.DatePicker");
-/**
- * @fileoverview
- *
- * A wrapper for a Dojo DatePicker, treated as a black box.
+/**
+ * @fileoverview
+ *
+ * A wrapper for a Dojo DatePicker, treated as a black box.
*/
-/**
- * Creates a xap.bridges.basic.DatePickerBridge.
- *
- *
- * @class xap.bridges.basic.DatePickerBridge is the bridge between an XML element
- * representing a control and a subclass of DatePicker. This class
- * is typically not used directly but is extended by other classes
- * for its subclasses.
- *
- * @author mturyn
+/**
+ * Creates a xap.bridges.basic.DatePickerBridge.
+ *
+ *
+ * @class xap.bridges.basic.DatePickerBridge is the bridge between an XML element
+ * representing a control and a subclass of DatePicker. This class
+ * is typically not used directly but is extended by other classes
+ * for its subclasses.
+ *
+ * @author mturyn
*/
-xap.bridges.basic.DatePickerBridge = function () {
- xap.bridges.basic.AbstractBlackBoxWidgetBridge.call(this);
+xap.bridges.basic.DatePickerBridge = function(){
+ xap.bridges.dojo.DojoWidgetBridge.call(this);
};
Xap.setupClassAsSubclassOf(
"xap.bridges.basic.DatePickerBridge",
- "xap.bridges.basic.AbstractBlackBoxWidgetBridge"
+ "xap.bridges.dojo.DojoWidgetBridge"
);
@@ -51,37 +51,24 @@
xap.bridges.basic.DatePickerBridge.prototype._peer = null ;
-xap.bridges.basic.DatePickerBridge.prototype.obtainPeer = function () {
- this._creationProperties.widgetId = this.getElement().getAttribute("id");
-
-// The superclass method is fine for this, almost as if it were originally here and had
-// been moved up there when refactoring.
- var originalDiv = this.getOriginalDomNode() ;
-
- //this._creationProperties.widgetContainerId =this._creationProperties.widgetId ;
-
- var peer = dojo.widget.createWidget("DatePicker", this._creationProperties,originalDiv);
-
- this.setPeer(peer) ;
-
-
-};
-
+xap.bridges.basic.DatePickerBridge.prototype.getPeerString = function(){
+ return "DatePicker" ;
+}
-xap.bridges.basic.DatePickerBridge.prototype.attributeSet = function () {
+xap.bridges.basic.DatePickerBridge.prototype.attributeSet = function(){
//TO_DO anything useful here? format-string?
};
-xap.bridges.basic.DatePickerBridge.prototype.getRootDomNode= function () {
- return this._peer.domNode ;
+xap.bridges.basic.DatePickerBridge.prototype.getPeerOnCommandEvent = function(){
+ return "onSelectDate" ;
}
// Just testing that the superclass event-mapper doesn't destroy any explicitly-defined
// events:
-xap.bridges.basic.AbstractBlackBoxWidgetBridge.prototype.onIncrementYear = function(){
+xap.bridges.basic.DatePickerBridge.prototype.onIncrementYear = function(){
this.fireEvent("onIncrementYear") ;
var bkpt = true ;
}