- The Book of Dojo
- The Dojo Book, 0.4
- Part 1: "Introduction"
- Part 2: "Out of the Box" Dojo
- Part 3: "The Dojo Programming Model"
- Part 4: "More on Widgets"
- Part 5: "Connecting the pieces"
- Part 6: "Customizing Dojo Builds for Better Performance"
- Part 7: "Utilities"
- Part 8: "Internationalization and Accessiblity"
- Part 9: "Dojo Community"
- Part 10: "Fresh From The Shed" Dojo
- BookWriting
- Glossary
1 Hello Tree World
Submitted by criecke on Sun, 03/25/2007 - 11:59.
Here's a simple example.
<div dojoType="Tree" >
<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 1.2.1.1" ></div>
</div>
<div dojoType="TreeNode" title="Item 1.2.2" ></div>
</div>
<div dojoType="TreeNode" title="Item 1.3" ></div>
</div>
<div dojoType="TreeNode" title="Item 2" ></div>
</div>
Which produces the following lovely tree:
SCREENSHOTYou can do open a node and show its contents by clicking the + icon, or hide them with the - icon, just like you're used to. Nice!
- Printer-friendly version
- Login or register to post comments
- Unsubscribe post

Bug in example
On Firefox (2.0.0.3), it appears that you need to modify this example to include the </div> tags, even for empty divs.
Thank You
... now corrected.