[Dojo-interest] building on ComboBox widget

Tijs Teulings tteulings at gmail.com
Mon Apr 24 07:25:09 MDT 2006


I am using the Dojo nightly and need a slightly modified version of  
the ComboBox. I need to override both the CSS template and the  
openResultList function and i tried a few methods but are having some  
trouble. I now have:

---------------- TransComboBox.js ---------------------

dojo.provide("local.TransComboBox");

dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");

local.TransComboBox = function() {

     dojo.widget.ComboBox.call(this);

     this.templatePath = null;
     this.templateCSSPath = dojo.uri.Uri("../tests/effects/local/ 
widget/templates/ComboBox.css");

     this.widgetType = "TransComboBox";

}

dojo.inherits(local.TransComboBox, dojo.widget.ComboBox);
dojo.widget.tags.addParseTreeHandler("dojo:transcombobox");


----------------------------------------------------------------


-------- test_transcombobox.html (fragment) ------

<script type="text/javascript">
	dojo.require("dojo.widget.*");
	
	// Load user custom widgets
	dojo.hostenv.setModulePrefix('local', '../tests/effects/local/widget');
	dojo.widget.manager.registerWidgetPackage('local');

	dojo.require("local.TransComboBox");
</script>

</head>
<body>
<select dojoType="transcombobox">
	<option value="foo">foo</option>
	<option value="bar">bar</option>

	<option value="baz">baz</option>
	<option value="thud">thud</option>
</select>

----------------------------------------------------------------

The result is a "FATAL: superclass: undefined borken" error message.  
Any hints? I've been looking at this too long...

Regards,
Tijs



More information about the Dojo-interest mailing list