Login Register

tree

Finding dijit.TreeNodes from Items

Hi,
I am currently trying to use the Tree-Component from Dojo 1.2.3. The widget works great - but one thing is missing: In the standard implementation it is possible to move a TreeNode to an ancestor of itself. This leads to errors in the Tree-Component.

Now I want to overwrite checkItemAcceptance so that this behaviour doesn't occur. The question I have now is the following: How can I get the dijit.TreeNode-Objects form Item-Objects I can get from the TreeModel? Is there an example how I can achieve this?

Thank you for any hint!

Here is a simplified version of my method:

how to save store after user DnD-Tree-action

I had posted this on the mailing list, but Dustin recommnded to post here on the forum, so here it is:

I am experimenting with a DnD enabled dijit Tree and
ItemFileWriteStore. After a user has done some DnD action I want the
store automatically to save(). What is the recommended way to do that
? Any event I can connect to, which only fires after successful Tree
DnD ?

I tried (with 95% success) overwriting the Tree onDndDrop function
with the following snippet:


onDndDrop: function(source, nodes, copy, destination) {
this.inherited(arguments);

dijit Tree mouse Control

Hi ,

I am trying to to apply some css on any node of dijit tree whenver i 'l take mouse on it.

i tried something like this
dojo.connect(this.tree.domNode, "onmouseout", this,"onMouseDown"),

well i know i have to call _updateItemClasses instead of onMouseDown funtion which change the css on tree node.

but i am not able to find what should i use instead of "this.tree.domNode" because using this it work if i move my mouse any anywhere on tree.

Thanks ,
Amit Kumar

Binding dijit.Menu to dijit.Tree

Currently I was trying to copy the code from http://dojocampus.org/explorer/#Dijit_Tree_With%20Popup%20Menu but it seems that this._domElement2TreeNode() is not a valid function in the version of dojo i'm using (1.2).

I am also doing this programmatically; binding the menu to the top level tree node but what I would like to do is only apply the menu to child (leaf) nodes. To be able to do this I need to either iterate through the tree and unbind the parent nodes or find the leafs and call bind on them.

Tree: Positions of nodes in containers

Hi,

currently I am working on a TreeEditor and of course I'd like to use the Tree-Implementation of Dojo.

So far, I was able to create a quite simple example with which I seem confident, that the editor will work. I can drag nodes to other nodes and the tree is updated and I am able to use the callback functions so I will be able to trigger some server action.

Tree works in 1.1.1 but get gets NS_ERROR_INVALID_POINTER in dojo.js

The following code works in Dojo 1.1.1 buts fails with an error in 1.2.3.

Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]

var djConfig = {
        isDebug:true, parseOnLoad:true
        };

dijit.Tree data collision error help

Hi,

I'm fairly new to dojo, and searched for similar postings but hit an impasse. Perhaps someone here could help or at least point me in the right direction.

I'm using dojo version 1.1.1 to construct a dijit.Tree; however, I receive the following collision error when children nodes (with different parents) contain the same "name":


{tree} : error loading root children: [ Error: dojo.data.ItemFileReadStore: The json data provided by the creation arguments is malformed. Items within the list have identifier: [name]. Value collided: [D] ]

Keeping tree data in sync with db2

Hi,
I have a work management application where each user can have multiple tasks that line up in a queue. I can easily represent this in my backend db2 database and in a dojo tree, where each node is a user and the work items for each user expand underneath the node. (You can't have subunits of work, so there are no expandable nodes underneath a user).

The workers manager should be able to move work items from user to user within the tree, again handled nicely with a dojo tree. The move updates the internal datastore.

Tree - how to toggle tree node icon between checked checkbox and unchecked checkbox

I have a tree for which I need to be able to toggle the icons on the nodes between a checked checkbox and unchecked checkbox. I can use getIconClass to set the initial icon for all of the nodes to an unchecked checkbox (per example provided on pp. 329-335 in Mastering Dojo by Rawld Gill, Craig Riecke, and Alex Russel). What I haven't figured out is how to test for which icon is currently set on a tree node so that when the node is clicked the icon can be toggled to its inverse. If anyone has done this, I would appreciate seeing your example.

Bind a Tree to a servlet

I have been trying to bind a tree to a servlet but have not been able to find an example of how to do this properly. Basically, I have seen the tree demo pages that use static content, but what I want to do is to load the tree from a source that is a server request (http response returns xml, text, or json). Of course I'll want to send changes back to the server as well, but to begin I just want to load the tree from a servlet source.

Syndicate content