This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to show icons in Tree using DOJO 0.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to show icons in Tree using DOJO 0.4" Watch "How to show icons in Tree using DOJO 0.4" New topic

How to show icons in Tree using DOJO 0.4

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
I am using DOJO 0.4 to create a tree. The tree gets successfully created.

My question:
How can I show the lines that connect the nodes? At present, the tree does not show any connecting line.
2) How can I display the tree in fully expanded form? In other words, when the tree gets displayed, all the child nodes are displayed, instead if being collapsed.

Any help will be appreciated.

Following is my code:

<script type="text/javascript">
var djConfig = { isDebug: false };

<script type="text/javascript" src="scripts/dojo.js">
/* Load Dojo engine */

<script type="text/javascript">

dojo.addOnLoad(function() {
function(message) { alert(message.node.title+" selected"); }

<div dojoType="TreeSelector" widgetId="tSelector" eventNames="select:nodeSelected" ></div>

<div dojoType="Tree" selector="tSelector" toggler="explode">
<div dojoType="TreeNode" title="Item 1">
<div dojoType="TreeNode" title="Item 1.1" ></div>
<div dojoType="TreeNode" title="Item 1.2" >
<div dojoType="TreeNode" title="Item 1.2.1" >
<div dojoType="TreeNode" title="Item" ></div>
<div dojoType="TreeNode" title="Item 1.2.2" ></div>
<div dojoType="TreeNode" title="Item 1.3" ></div>
<div dojoType="TreeNode" title="Item 2" ></div>
Andre Charland

Joined: Jul 20, 2007
Posts: 16
I think this question would be better suited to somewhere in


Andre Charland<br />Co-Founder, CE0 <br /><a href="" target="_blank" rel="nofollow"></a>
jQuery in Action, 2nd edition
subject: How to show icons in Tree using DOJO 0.4
Similar Threads
DOJO Grid and JSON
DOJO Tree using 0.4
Help needed with DOJO and JSP
(dojo tree) how can I bind an event with the text?
not able to get width and height of another html file inside html