July 2, 2015
11:33 a.m.
Le 30 juin 2015 à 16:01, Christophe Demarey a écrit :
Hi,
I have a TreeModel with different kinds of TreeNodeModel and I would like to get a customizable display string depending on the node type. It looks like it is not possible to dispatch on nodes in a display block because it only takes the item (node content) and the tree as parameter. It is strange as I expect that to be a standard feature. Do I miss something?
I found a workaround and it looks like a missing feature in Spec TreeModel. You can customize the display by settings columns on the tree like this: self newTree columns: { TreeColumnModel new displayBlock: [:node | node label ] };