You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Eric Hsieh <ec...@yahoo.com> on 2005/04/15 02:09:27 UTC

not saving state of expand/collapse in tree2?

I'm using tree2 to display a dynamic amount of data. 
I  noticed that the state of the tree gets saved as a
cookie in the session.  Is there anyway to force the
tree to not save the state? On a new request I want
the tree to render as if it were being rendered for
the first time.

The problem I'm having is that the data that populates
the tree is dependent based on a user selection.  For
example, ball A and ball B both have different
attributes, displayed as a tree. If the user clicks on
ball A they'll be shown a 3-level tree.  If they then
switch to ball B, which has no attributes, no tree
should be shown.  As soon as the user clicks on ball
B, jsf will try to restore the initial 3-level tree,
but the backing bean is already using ball B to
construct the tree.  Trying to apply the old
expand/collapse values from the cookie isn't going to
work on ball B (since the tree is different).

I guess if I can't turn the state saving thing off,
what's the recommended method of creating a TreeNode
model that's generated from a client-selected value?

Eric


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/