Thanks.
- Anu
<t:tree2 id="serverTree" value="#{navigationBacker.treeData}"
var="node" varNodeToggler="t" clientSideToggle="false" showNav="false"
showRootNode="false">
<f:facet name="projekt-folder">
<h:panelGroup>
<h:commandLink action="" actionListener="#{navigationBacker.processAction}">
<t:graphicImage value="/images/yellow-folder-open.png"
rendered="#{t.nodeExpanded}" border="0" />
<t:graphicImage value="/images/yellow-
folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0" />
</h:commandLink>
<h:commandLink action="">
styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
actionListener="#{navigationBacker.nodeClicked}"
value="#{node.description}" immediate="true">
<f:param name="db_id" value="#{node.identifier}" />
<f:param name="toViewId" value="projekteTable.jsp" />
</h:commandLink>
<h:outputText value=" (#{node.childCount})" styleClass="childCount"
rendered="#{!empty node.children}" />
</h:panelGroup>
</f:facet>
On 10/22/05, Marcel Ruff <[EMAIL PROTECTED]> wrote:
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

