• Post Reply Bookmark Topic Watch Topic
  • New Topic

Very simplified version of rich tree with list data source still giving me a blank page...

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the weekend. And it's JSF. The two add up to low traffic.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!