Login Register

TreeNode

Problem with templateString of dijit.tree and TreeNodes

Hi,

right now I'm totally lost with 2 Problems with dijit.Tree and templating.

Problem 1:
I already managed to modify the template String of my dijit.Tree. But how do I modify the template String of the TreeNodes?

right now I got:

<code>
var sitemap=new dijit.Tree({
   id:'sitemap',
   store:sitemapStore,
   query:{top:true},
   templateString:"someHTMLstuff"
  }
   ,dojo.byId("sitemap"));
</code>
but this only modifies the Tree container, not the template of the tree nodes.
I'm looking for something like:

Add new item to a parent pointed by other items

I am using the example "test_Tree_Notification_API_Support.html" and trying to add a new item to a parent which other items point to.
In the example,
root
- node1
-- node1.1
-- node1.2
- node2
- node3
- node4
- node5

So, I add "node1" to node5. Now, it becomes
root
- node1
-- node1.1
-- node1.2
- node2
- node3
- node4
- node5
-- node1
--- node1.1
--- node1.2

Then, I add a new node "node1.1.1" to "node1.1"
It becomes
root
- node1
-- node1.1
-- node1.2
- node2
- node3
- node4
- node5
-- node1
--- node1.1
---- node1.1.1
--- node1.2

Gray-out/Disable Specific TreeNodes

I am totally new to dojo and have been asked if I can help a team that is trying to use a tree widget for navigation. We are trying to figure out how to get a tree widget to display some nodes as grayed out (disabled) with others still enabled. I want to be able to display all the nodes, rather than to have nodes simply not displayed. When the user tries to click on the disabled nodes, nothing will happen. Likewise, when the user hovers over them, they should not become highlighted.

I have searched the forum and other sources but haven't found anything that seems to fit our need.

reordering nodes in a Tree

I am using an ItemFileWriteStore to store data for my Tree widget. How can I go about reordering the top level nodes in my Tree? This might be a question that deals more with the ItemFileWriteStore, if so, please move this post to correct category.

Thanks!

Syndicate content