Opened 9 years ago

Closed 9 years ago

#11896 closed defect (invalid)

dijit.Tree getIconClass - icons not refreshed/displaying

Reported by: mdesmond Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.5
Keywords: dijit, tree, getIconClass Cc:
Blocked By: Blocking:

Description (last modified by bill)

I have a dijit.Tree and I have overridden the getIconClass function to return a custom icon class.

1). When the tree initially appears my custom icon is not displayed at all.

2). When the tree is collapsed/expanded the icon is applied to the root node but never to the leaf nodes.

I'm using an ItemFileReadStore and a ForestStoreModel. Code is attached.

Thanks Mike

Attachments (3)

index.html (2.4 KB) - added by mdesmond 9 years ago.
treebug.zip (1.7 KB) - added by mdesmond 9 years ago.
unzip and open index.html
diagram_16x16.png (477 bytes) - added by mdesmond 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by mdesmond

Attachment: index.html added

Changed 9 years ago by mdesmond

Attachment: treebug.zip added

unzip and open index.html

Changed 9 years ago by mdesmond

Attachment: diagram_16x16.png added

comment:1 Changed 9 years ago by bill

Description: modified (diff)
Resolution: invalid
Status: newclosed

You are setting the value of getIconClass too late, after the Tree has already called the original getIconClass(). Something like this will work:

var tree = new dijit.Tree({
    model: treeModel,
	showRoot: true,
	getIconClass: myGetIconClassFunction
},
"treeOne");
Note: See TracTickets for help on using tickets.