I have a tree on the left side of my page that always stays the same, used to display projects, devices and channels. When you click on a project it takes you to a screen with two tabs.
The first tab is a list of the devices for that project and the second tab is a list of channels for that project. Each tab has a tree(so three trees total), the device tab just has a tree with a list of devices, and the channel tab a tree with a list of channels.
Both just look like a list though, since there are no child nodes, they are all leaf nodes so it just looks like a list. When you click on one of these devices or channels it reRenders some output text fields for that tab. But there is a problem sometimes. If there is only one channel or device on a tab, and you click on the one device or channel, it does reRender the output fields just fine. But then if you go from one tab and back to the first tab, that device or channel will still have a blue rectangle as if it were still selected, but the outputText fields have not been reRendered, they are just blank. Plus, if you try to click on the tree node again so i does reRender the text fields nothing happens. The method to reRender the fields is not being called, Im guessing because it already thinks this node is selected so there is no need to reRender anything.
This isn't a problem when there is more than one device, you can just click from device to device to reRender the fields. But if there is only the one device, it will act as if it has already been clicked but you will not be able to do anything and the text fields stay blank.
Im sure there is just some attribute I need to add to rich:tree but I havent been able to figure out which yet.
I you want to see it, here is the code snippet for the two tabs:
True wisdom is in knowing you know nothing - Socrates