tags:

views:

43

answers:

0

So, I've got a Struts2.1.8 application and I want to add a tree control with icons, similar to what you see on a file manager. I decided to use the tree control provided in the struts2-dojo-plugin. The tree displays just fine, but I can't find a way to add icon decorations to the nodes. Anyone know how to do this?

I've searched the source and the interwebs with no luck so far. The closest I got was a faint whiff from something in the plugin distribution called TreeDocIconExtention. Is this what I need?

Here's the code so far:

  <sx:tree id="theTree" label="The Tree">
    <sx:treenode id="node1" label="Node 1" nodeType='' />
    <sx:treenode id="node2" label="Node 2">
      <sx:treenode id="node3" label="Node 3" />
      <sx:treenode id="node4" label="Node 4" />
    </sx:treenode>
    <sx:treenode id="node5" label="Node 5" />
  </sx:tree>