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/11/15 21:07:53 UTC
svn commit: r475422 - in /incubator/xap/trunk/src/xap:
bridges/xap/XapComboBoxBridge.js widgets/ListBox.js
Author: mturyn
Date: Wed Nov 15 13:07:52 2006
New Revision: 475422
URL: http://svn.apache.org/viewvc?view=rev&rev=475422
Log:
1.) Made XapComboBoxBridge.getRootDomNode() point to its child listbox, if it has one,
and its own <div/> if not.
2.) Simplified template string for ListBox.js.
Modified:
incubator/xap/trunk/src/xap/bridges/xap/XapComboBoxBridge.js
incubator/xap/trunk/src/xap/widgets/ListBox.js
Modified: incubator/xap/trunk/src/xap/bridges/xap/XapComboBoxBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/xap/XapComboBoxBridge.js?view=diff&rev=475422&r1=475421&r2=475422
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/xap/XapComboBoxBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/xap/XapComboBoxBridge.js Wed Nov 15 13:07:52 2006
@@ -77,5 +77,17 @@
childHandler.isChildOfComboBox = true;
this._myListBox.setOnStateChange(this, 'fireEvent', 'onTextChange');
this._myListBox.setOnStateChange(this, 'fireEvent', 'onCommand');
+}
+// This is the select box, which in this case is a drop-down
+// ---but this is only possible once the listbox child has
+// been added; until then, the outer dom node will have
+// to do:
+xap.bridges.xap.XapComboBoxBridge.prototype.getRootDomNode = function(){
+ var node = this._peer.domNode ;
+ if ( this._peer.children && this._peer.children.length > 0){
+ return this._peer.children[0].select ;
+ }
+ return node ;
}
+
Modified: incubator/xap/trunk/src/xap/widgets/ListBox.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/ListBox.js?view=diff&rev=475422&r1=475421&r2=475422
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/ListBox.js (original)
+++ incubator/xap/trunk/src/xap/widgets/ListBox.js Wed Nov 15 13:07:52 2006
@@ -17,7 +17,7 @@
dojo.lang.extend(xap.widgets.ListBox, {
// If size==1, get a combo box, which we don't want, so
// start with size 2, increment if necessary as we add children:
- templateString: '<div><form><select dojoAttachPoint="select" size="2"></select></form></div>',
+ templateString: '<select dojoAttachPoint="select" size="2"></select>',
templateCssPath: null,
widgetType: "ListBox",
isContainer: true,