Anu Padki wrote:

I am trying to get the lazy loading working for tree2.
A lot of debugguibg shows that the changed value of the nodes is not persistent acorss the requests.
After I quit from the ActionListener, the new nodes are forgotten.
I suspect I have to call saveState on the tree. Any one knows how to use saveState.
Any clues? Is this the right direction to go?
- Anu

Hi Anu,

the <x:saveState> has nothing to do with your problem.

The code snippets i have written in
 http://wiki.apache.org/myfaces/Tree2
works perfectly for me to lazy load the tree nodes.
Note that my backer beans are in the "session" scope,
configured in WEB-INF/examples-config.xml.


You may, at a later development stage, miss the browser-back-button
functionality.
You press 'BACK' and the navigation
of the previous page (from browser cache) does not work,
than <x:saveState> comes into the game.
Put your backer beans now in the "request" scope
and declare them with
  <x:saveState id="navigationBacker_Save" value="#{navigationBacker}" />
<x:saveState id="stindexScrollerList_Save" value="#{stindexScrollerList}" />
  ...
in your jsp page, and all is well :-).
See http://wiki.apache.org/myfaces/How_JSF_State_Management_Works

regards
Marcel

PS: I have updated http://wiki.apache.org/myfaces/Tree2 as well

Reply via email to