I have my tree working and showing ownership (finally), and now I have been trying to get it to change what shows up in my content pane when a node is clicked on. There is only one example I have found and it doesn't fit what Im doing at all.
So I have a page that has a bunch of ui:define areas, most of them are always the same on each page, but the main one is "content" that changes regularly. In my "project_explorer" ui:define area I have a rich:tree like this:
Im not sure how I should handle this. I can change each node there to am h: outputLink instead of h: outputText, and possibly have the page it directs you to populate data depending on which node is selected. That is my idea of how to handle this, but still I need to figure out how to tell my jva code which node is selected.
I started trying to do something very simple, first doing
java code that set a
String variable to "name":
Then adding doing something like this for the rich:Tree:
all I added to it was nodeSelectListener="#{treeClickBean.selector}" hoping that when that node was clicked on it would invoke the selector method and set nodeTitle to "name"
Then on the
jsf pages "content" pane I put:
I figured this was the simplest way to start, hoping that when a node was clicked on the content pane would display "Selected Node: name"
But this didnt happen unfortunately. Ive tried a few different variations but havent had any luck.
So I need some advice on how to handle this. Should clicking on a node send you to a different page altogether, or should I have it change the ui:define "content" area only. Are there any good (simple) samples out there, I really didnt find any.
Any advice at all on this would be great.
BTW here is the entire jsf page so you can see the different ui:define areas if it helps: