12 Replies Latest reply on Oct 20, 2010 4:54 AM by barbara b

    Remebering tree expanded state

    Mikael Andersson Master

      Hi all.

      This is a question which has been asked a lot, I've spent this morning reading lots of posts about this but didn't find one which explained everything.

      I'm hoping to get a clear answer here and if I do, I'll add a nice example to the wiki cookbook :)

      So the question is how do I make sure that the tree expanded/selection state is preserved across request, both redirected and not? (I (svn) checked out the tree-demo sample and had a look, it contains a lot of stuff but couldn't quite detect what was specific to the expanded state)

      I was hoping to have an application scoped bean containing the applications navigation trees (the actual treenode data) and then have a session scoped user specific bean containing a users current tree node selection.
      Is this possible, currently I'm thinking that the tree data needs to be stored for each users and not just the current selection.
      This may be the reason I'm not getting it to work (haven't put the tree data in session scope yet).

      Many thanks,