Login Register

dijit.Tree

Tree error when ItemFileReadStore has items with an attribute that has an object value

I have JSON data that I read with an ItemFileReadStore and wrap with a TreeStoreModel. The items in the data have an attribute "value" which may be a string, number, or object. If it's an object I get the followed error in Firebug:

error loading root: TypeError: _48 is undefined message=_48 is undefined

  • If I remove the Tree element, no error occurs. (The GET occurs)
  • If I edit the "value" attribute to a scalar (not an object) no error occurs.

Tree formatting issues (user or system?)

search wasn't necessarily my friend since I think I'm re-asking some questions that weren't previously addressed in the forum (not sure if the "bump" rule applies to 6+ month old posts).

I'm seeing two display issues w/ tree (created w/ the apparently deprecated "store" config vs. "model")
1. for a forest, vertical grid lines aren't being drawn to connect the root nodes resulting in a somewhat quirky look (confirmed in soria and tundra).

Tree model - how to cancel a request?

I have a custom widget which includes a tree. When I destroy this widget, I'd like to cancel the tree request. How do I cancel a request for tree data?

How to make Dijit TREE items as anchors?

I had originally used the Tree widget from Dojo 0.4 where I had put the titles for each node as anchor tags with links. That worked perfectly until now when I upgrading to Dojo 1.2.3 and made changes to use dijit.Tree. I used the Forest Store Model and it now works well except that it shows the anchor tags as plain text. So the Tree items appear something like this:

<a href='linkToPage.html'>Tree Item 1</a>

How can I make it appear as HTML? Is there a flag to turn off the HTML filter or handleAs HTML when displaying the item / node labels?

ItemFileReadStore and Dijit.Tree Json formatting issue

I'm using the dijit.Tree control with an ItemFileReadStore to populate the tree from a .net WCF restful web service returing JSON. Problem is that the items array of object I'm returning has to have a children array whether it's populated or not. This serializes to "children":null.

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] ]

dijitTreeContent label wrapping

Hi,

I upgraded from v1.0 to v1.2.2 and noticed that my dijit.Tree labels weren't wrapping anymore. Looking at the css I found

word-wrap: nowrap;

for dijitTreeContent. Changing it to normal wraps the label, but unlike v1.0 where the second line of the label lines up underneath the first character of the first line, now it wraps all the way to the left underneath the plus symbol. I'd much rather the wrapping occurred like v1.0 but I haven't had any success yet. Does anyone have a solution?

Thanks,
Doug

Scrolling tree node into view

I'd like to be able to programmatically scroll a content pane containing a tree so that a certain tree node is visible.

How can I do that?

How to build a collapsible menu using dijit.Tree

I had a page where I wanted to create a collapsible navigation menu and wanted to learn about the dijit tree widget. I’m pretty happy with the result. Note that I removed the branches and icons associated with the tree to give it a cleaner look. Is this a misuse of the tree widget? Probably, but it does result in a pretty slick menu that is easily maintainable since the hierarchy is stored in a json data file.

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

Syndicate content