• Post Reply Bookmark Topic Watch Topic
  • New Topic

Woodstock Tree Deselect Node

 
Scott Stuart
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone know how to reset the selected node in a Woodstock Tree component?

The use case i've got is as follows, there are 2 trees on the screen, there is a relationship between the 2 trees such that the second tree can only be interacted with after the first. Which works fine. But, each time the first tree gets selcted the second tree needs to be reset to have no selection.

I'm at my wits end trying to get this to work. I can achieve what i need in the backing bean by doing a getTree().setSelected(null) and the rest of my business logic works fine, but even when doing this the second tree still shows the node as highlighted in the actual browser.

I'm pretty sure this could be accomplished using the client side javascript, but tbh, i'm not really sure how to hook this into the interaction of tree1, such that it can clear tree2.

I know there has been some sort of change in the newer version of Woodstock as to how it knows about the selected node i'm just not sure how this impacts what i'm doing.
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of try

Woodstock components tend to behave weirdly with 'null' values

I just checked this, but this works only if you build the tree dynamically
[ December 01, 2008: Message edited by: Kavita Tipnis ]
 
Scott Stuart
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kavita,

thanks for the this, been a few weeks since I had a chance to look at this again with other commitements. The fix you suggested works, but i run into another weird problem with a small sample project testing what you suggested.

Tried a sample project with 2 trees, deployed to glassfish v2 and your suggestion worked. Tried it with the netbeans bundled tomcat 6.0.14 and it worked. Unfortunately i was deploying my app to tomcat 6.0.16, where it, and the sample, didn't work. This seems to the be the case just now, unless there's something really weird i'm missing.

I've got the app deployed on a tomcat 6.0.14 and 6.0.16 release, identically configured, and it doesn't seem to work on the latter. Gonna give 6.0.18 a try and see what happens with that.

Just thought i'd post incase anyone else is hitting the same problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!