GeeCON Prague 2014*
The moose likes JSF and the fly likes Rich:tree and managing expand/collapse from first load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Rich:tree and managing expand/collapse from first load" Watch "Rich:tree and managing expand/collapse from first load" New topic
Author

Rich:tree and managing expand/collapse from first load

Enrico Drusiani
Greenhorn

Joined: Dec 09, 2009
Posts: 2
hello everyone!

I'm working on project based upon Seam 2.1.1 / Richfaces / Hibernate

i have to show in a rich:tree some entity bean wrappen in some utility classes. that's the easy part.

Now, i save the last used bean in order to load up the page with that information already there.
i'd like to have the tree expanded to that position as soon as the pages loads the first time.

i'm using switchType CLIENT because i needed as few calls as possible in order not to mess with the page general flow, so i'd like to stick with that, if possible.

here's some code.




this is the method i use to create the backer Bean



and this is the method i use to fill the tree



RichTreeBean is the utility class that wraps the entity and shows to the user some data.

i've tried to use adviseNodeOpened and changeExpandListener as suggested in other threads, but without success (that's why i cleaned them up).

Thanks for any suggestion and sorry for my bad English

Enrico.
Enrico Drusiani
Greenhorn

Joined: Dec 09, 2009
Posts: 2
i forgot to add i get an exception

 
GeeCON Prague 2014
 
subject: Rich:tree and managing expand/collapse from first load