Login Register

1 Hello Tree World

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:

SCREENSHOT

You 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!

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.