[Dojo-interest] Widget Manager Problem?

Bernie Durfee bernard.durfee at suny.edu
Thu Apr 13 12:54:29 MDT 2006


I just checked out the latest nightly build and I am now having problems with the widget manager. In my page I have the 
following tag...

...
<div id="documentsTree" dojoType="Tree"></div>
...

...which should get parsed into a tree widget with an ID of documentsTree, correct? Then in my JavaScript, I have the 
following...

var documentsTreeNode = document.getElementById("documentsTree");
if(!documentsTreeNode) {
   dojo.debug("documentsTree node does not exist");
}

var documentsTreeWidget = dojo.widget.manager.getWidgetById("documentsTree");
if(!documentsTreeWidget) {
   dojo.debug("documentsTree widget does not exist");
}

...the debug output is...

DEBUG: documentsTree widget does not exist

...so the element is in the DOM, but the widget manager can't find it. Is the widget manager currently broken or am I 
doing something wrong? There are no error messages, I have the following at the top of my page...

<script type="text/javascript" src="dojo/dojo.js"></script>
<script type="text/javascript">
   dojo.require("dojo.html");
   dojo.require("dojo.widget.Manager");
   dojo.require("dojo.widget.Tree");
   dojo.require("dojo.widget.TreeNode");
</script>

Thanks,
Bernie


More information about the Dojo-interest mailing list