Login Register

dijit.Tree

Ability to reorder tree siblings using DND

We are working on migrating from dojo 0.4 to the latest dojo nightlies. We discovered that the dijit tree no longer supports reordering sibling elements in dojo 1.x (it was supported in dojo 0.4). I was hoping someone might be able to let me know when this feature will be added. It looks like currently the milestone is 1.4. Is there any chance that could be moved up? This is an absolutely critical feature for our software. Without it, we might have to use both dojo 0.4 and dojo 1.x =/

Here is the bug report covering this issue:
http://bugs.dojotoolkit.org/ticket/6445

Moving Tree nodes both horizontally and vertically

I need a tree widget that lets me drag and drop nodes both within the same parent node (ordering), and to a different parent node (moving).

Example:

  • Fruit
    • Apple
    • Orange
    • Tomato
  • Vegetable
    • Lettuce
    • Carrot

dijit.tree programmatically got an "error loading root": "query is not defined"

Hi there !

I'm in front of a boring problem. I try to set up a dijit.Tree programmatically, and I always got the same error :


error loading root: ReferenceError: query is not defined message=query is not defined

Here is my code :

var oTree = {
identifier: 'id',
label: 'name',
items: [
{ id: '0', name: 'Fruits', top: true, children: [ {_reference: 1}, {_reference: 4} ] },
{ id: '1', name: 'Citrus', items: [ {_reference: 2}, {_reference: 3} ] },
{ id: '2', name: 'Orange'},

dijit.tree (dojo 1.0) - Can I add images where the text is?

Hi, is it possible to embed images (or any html code) into the tree nodes?

I know you can change the icons but what if I want to use some images where the data text is?

Cheers,

Bart

Marking a tree node as selected programmatically

I'm trying to mark a tree node as selected when the page loads. This won't be the same node each time. For example, in the tree of continents/countries I would like to be able to have a HTTP GET parameters like ?continent="Africa"&country="Uganda" and the tree will be highlighted on load. And this preferably without having to change the json file.

Is there an easy way to do this?

dijit.Tree: are items limited to text display, or can they be edited and/or enhanced for more flexible display?

I'm working on a configuration page where a variety of properties need to be displayed and set. The properties are of various types: text boxes, popup menus, checkboxes, etc. dijit.Tree looks good, but all of the examples have tree nodes which just show a line of text, which won't meet my needs.

Is there a way to enhance the Tree leaves (dijit._TreeNode, I believe) so that they will a) display my data in whatever format I want, and b) handle writing any changes back to the data store?

dijit.Tree without using dojo.data.Store

Hello,

Trying to get a feel for Dojo since their partnership with the Zend Framework by attempting to reproduce the functional of a few basic JavaScript we're using with that available in Dojo....

Currently trying to work out if dijit.Tree can convert a nested unordered list scenario like belong into a Tree..

<ul dojoType="dijit.Tree">
  <li>
     <ul>
        <li> </li>
     </ul>
  </li>
  <li> <li>
</ul>

XML backend for dijit trees and grids

For the last couple of days, I've been trying to find the way to use the XML backend of the dijit.Tree widget, as the documentation says it should be possible. Quoting http://dojotoolkit.org/node/3157:

The easiest data-driven way to approach this uses dojo.data. Dojo.data reminds Andy of ODBC in the Windows world, JDBC in Java, and DBD in PHP (Andy gets around.) Though dojo.data can talk to many different kinds of backing stores formatted in CSV, XML or HTML, Andy picks JavaScript Object Notation, or JSON.

mishap handling subscribe to dijit.Tree which then causes IE to hang instead of firing onclick event created with connect

I somehow stubled upon a great way to hang IE and max out the cpu of your machine. A year later, I've finally figured out how to make it go away, so I thought I would share. I'm still using a version 1 of dojo that I downloaded on 3/10/2008 and I don't have time to deal with any new issues that might arise from upgrading to the latest version, so hopefully someone can test this on the latest.

I've left a lot of it out, but basically I have an object which I create using syntax as I've written at the end of this posting.

Tree DND Handle support

I'm trying to programmatically create a nested list of items (for my purposes a maximum of three deep), where only the leaf nodes are drag-able.

So far, I've tried using nested dijit.TitlePanes with multiple dojo.dnd.Sources, however this gets slower the more dojo.dnd.Sources you have (somewhere around 50 or so it becomes unbearable on a fairly decent system).

I took a look at the tree structure, but it looks like the idea of "Handles" was removed from the DND surrounding them, and wasn't able to find a good way to inhibit the dragging of non-leaf nodes.

Syndicate content