Opened 12 years ago

Closed 12 years ago

#3924 closed defect (fixed)

example of treeview functionality doesnt work as is, I found a solution

Reported by: guest Owned by: dylan
Priority: high Milestone: 1.0.2
Component: book Version: 0.9
Keywords: tree Cc:
Blocked By: Blocking:

Description

The example given in the dojo 0.9 book doesnt render appropriately as is. To view the page, go to:

http://www.dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/tree An excerpt from a given example is as follows:

var poptarts =

{ identifier: 'name',

items: [

{ name:'Fruit', type:'category'}, { name:'Cinammon', type: 'category'}, { name:'Chocolate', type: 'category'}

]

};

The example given didnt work for me, a tree was displayed, but all nodes had a label of 'undefined'. So, I finally found an example elsewhere suggesting that I should add a 'label' entry after the 'identifier'. Now it works fine. The declaration looks like this...

var poptarts =

{ identifier: 'name',

label: 'name', items: [

{ name:'Fruit', type:'category'}, { name:'Cinammon', type: 'category'}, { name:'Chocolate', type: 'category'}

]

};

Change History (3)

comment:1 Changed 12 years ago by Adam Peller

Owner: changed from carlavmott to criecke

comment:2 Changed 12 years ago by dylan

Milestone: 1.0.2
Owner: changed from criecke to dylan
Priority: highnormal
Status: newassigned

The addition of label: 'name' appears in all referenced docs in that section.

comment:3 Changed 12 years ago by dylan

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.