1

Is it possible to make <t:tree2> tree node selectable? I would need to select a node, and based on this selection to print out certain info on the page.

Danijel
  • 8,198
  • 18
  • 69
  • 133

1 Answers1

1

The Myfaces Wiki - Tree2 says

"Almost any type of JSF component (text, image, checkbox, etc.) can be rendered inside the nodes"

So I guess you you can place a button for example and use it for interacting and showing the needed data

I haven't worked with Tomahawk nor its tree2... but I think whatever i suggested would work for any tree... Also.. i'm not so sure that Tomahawk is the library to be used for fancy web app... You should check primefaces component library its for JSF 2 and its showcase is amazingly BIG and RICH... take a look at their tree , it got all you ever wanted and event more

PRIMEFACES Tree - Single Selection

PRIMEFACES Tree

Daniel
  • 36,833
  • 10
  • 119
  • 200
  • Thanks. I ment selectable in a way that I would click on it and it would be highlighted and selected. I still don't see how this could be done using text, image, etc...? – Danijel Mar 30 '12 at 21:32
  • 1
    if you take for example a checkbox ... and click on it, it will be selected... if you wrap it with div and on change of selection change the background of the div , it gets highlighted ... am i in the wrong direction , of course a little bit of jquery magic will do the fancy trick... – Daniel Mar 30 '12 at 21:37
  • so there isn't a simple, normal solution? there has to be some "magic"...? – Danijel Mar 30 '12 at 21:56
  • Ok. I was affraid of that answer - "use better library", it might be too late now. :-( – Danijel Mar 30 '12 at 23:44
  • I'm not saying tomahawk isn't good enougth, never worked with it... but if it takes to much time and effort to achieve your goal, you should reconsider your choosen framework – Daniel Mar 31 '12 at 19:07