This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Instead of using my code that is rife with potential erros, I decided to simplify things to determine if it was just in the way I was binding my list to the rich tree. ANd in its most simplified form I am still getting just a balnk page.
Here is what i did:
First I made a simple class to declare a list, populate it with one entry and have setter and getter:
When I printed out the value of ids it printed out [Test] so it seems the list is getting the value, and should not be null. SO I created a managed bean, and then tried to bind ids to a tree:
But all that does is print out a blank page, just like my other code up there. This is as simple as it can get, so I must be missing something about how to bind this to a treeNode. Can anyone tell me what Im doing wrong?
Im kind of thinking I might need more java code. Maybe something needs to invoke the getter method so it will first add "Test" to the ids list? That is really all I can come up with though.
edit:
I even simplified it a bit further by doing this:
ANd still a blank page. However, I did change nodes="#{nodesBean.ids}" to roots="#{nodesBean.ids}" and I did get a one branch tree with a value of
[I@1486306
Not what I was looking for, but compared to the luck I have had with this it is almost a miracle
True wisdom is in knowing you know nothing - Socrates
I just needed to change nodes="#{nodesBean.ids to roots="#{nodesBean.ids
and also create a void method to do the adding of the values to the list, then call that method in my getIds method and now it works.
On a side note I have never seen the jsf forums so dead (I know I have only been a member since april but still)