Replace labels of TreeNode with HTML in 1.4b2

View: New views
2 Messages — Rating Filter:   Alert me  

Replace labels of TreeNode with HTML in 1.4b2

by Joe Barzilai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey all,
I was testing my application against 1.4.0b2 to start the upgrade process and I've run into a bit of a snag.  I am appending a <span> to the labelNode that only displays on mouse over of that treeNode.
In 1.3.2 I was overriding the setLabelNode method of my overriden dijit._TreeNode class, however it appears that that method is gone.  In its place the way of setting your own labels (from what I can see) is to override getLabel on the Tree, however the results of that method are a String and are simply used to set the innerText on the labelNode.

So, I'm wondering what you think is the best way to set the labelNode of my TreeNode and still work inside the framework that the Tree has set up.  Or is there a better way of accomplishing my goal?

Thanks,
Joe

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Replace labels of TreeNode with HTML in 1.4b2

by Bill Keese-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm, yeah, I moved the label logic into attributeMap.   If you define a custom _setLabelNodeAttr() method (same as your old setLabelNode() method) that should work.

On Fri, Nov 6, 2009 at 7:04 AM, Joe Barzilai <jabber3@...> wrote:
Hey all,
I was testing my application against 1.4.0b2 to start the upgrade process and I've run into a bit of a snag.  I am appending a <span> to the labelNode that only displays on mouse over of that treeNode.
In 1.3.2 I was overriding the setLabelNode method of my overriden dijit._TreeNode class, however it appears that that method is gone.  In its place the way of setting your own labels (from what I can see) is to override getLabel on the Tree, however the results of that method are a String and are simply used to set the innerText on the labelNode.

So, I'm wondering what you think is the best way to set the labelNode of my TreeNode and still work inside the framework that the Tree has set up.  Or is there a better way of accomplishing my goal?

Thanks,
Joe

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest