Login Register

node

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.

Getting value of underlying formfield through to programmatic dijit

When programmatically applying a dijit to a form textbox, is there an automatic way of "percolating" the value of the underlying html textbox through to the dijit object?

By "natural way", I mean without having to specify explicitely {value : underlyingNode.value} when defining the dijit object.

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.

Styling tree nodes and leaf nodes differently

I'm trying to apply different styles to the tree and leaf nodes.

I realized through tinkering and looking at "scripting trees" (http://dojotoolkit.org/book/book-dojo/part-2-dijit-dojo-widget-library/a...) and then looking at a thread (http://trac.dojotoolkit.org/ticket/7194) that I could use "getLabelClass". I can target the either the leaf of the tree node, but I can't apply css to both. I only get the tree node styled with what I currently have. What do I need to do to be able to style both the tree and leaf nodes?

Thanks!

Insert HTML code to a DOM node

Hello guys, i'm new here and have a question, do you know a way to add HTML parsed string to a DOM node like dojo.place adds a DOM node to another?, i have seen that there is a dojo.html object that makes this but i don't know if it's on an old version or it's new, the fact is that it's not on version 1.1.1. If it's old, what is the new instruction to do the same?, if it's new, is there another way to insert the HTML code moreover DTL way? i think DTL is to do more complex things. Regards

How to find a tree nodes previous sibling

I am trying to implement increase/decrease indentation functionality for a selected node in a tree. The decrease indentation is reasonably straight forward using the following code (although it does loose its relative position as it is just added to the end of the the list of nodes at the new level which is annoying)

var oldParentNode = currentNode.getParent();
var oldParentItem = oldParentNode.item;
var newParentItem = oldParentNode.getParent().item;
currentModel.pasteItem(currentItem, oldParentItem, newParentItem, false);

Accessing parent from child node in dijit tree

Hi All,

I've got a tree which has this data structure below
JSON

{
    "label": "name",
    "identifier": "id",
    "items": [
        {
            "id": "4",
            "name": "Achievements",
            "children": [
                {
                    "id": "20",
                    "name": "HELLO"
                }
            ]
        },
        {
            "id": "3",
            "name": "My page",
            "children": [
               
            ]
        }
    ]
}

Tree widget: when a parent node becomes a child node of its son

Using Dnd feature in tree, you can experience what happens if you drag a parent node and drop it on any of its child nodes:
the parent node and the child node suddenly disappears from the view!

here is what happens in dijit/tests/tree/test_Tree_DnD.html:
treePic.jpg

The explanation simply is we just created an isolated subtree:

{solution found} dojo.fx.wipeOut() - node error

Hello Everyone...

Happy to discover your forums !
First, sorry if I post in the bad section, my english is not so good... ;-)
So I've a simple question for you, I hope someone'll have an answer for me !

I'm trying the dojo.fx.wipeOut(), but I've the following error : "node has no properties".
Here's my code :

dojo.require("dijit.form.Button");
dojo.require("dojo.fx");
var wipeOut = dojo.fx.wipeOut({node: "menu",duration: 1000});
var wipeIn = dojo.fx.wipeIn({node: "menu",duration: 1000});
var currentAnimation;

Can we modify Dojo Tree Style sheet

Can we modify Dojo Tree and Its Node Style sheet.
If yes then how and where it is?
Actually I wanted to show the BackGround colour of selected node.

thanks
Manjul

Syndicate content