Sean Schofield wrote:
1) In the example, the commandLink wraps over the folder graphic and the
node description while the nav-plus and nav-minux are handled by the
tree2. The result is that a click on nav-plus and nav-minus on my
implementation does not do anything. I look at the example of the
server-side tree, nav-plus and nav-minus do response. So, i prabably
miss something from tree2 htmlTree besides the toggleExpanded(). Any
other setting and/or method i need to activate from htmlTree when user
selects a node? (i enclose my tree2 setting for your reference).
This is a known limitation. We're working on coming up with a
solution that would work for *both* client and server-side toggle.
Please announce when a solution is ready.
Excellent. It works :-) This means tree2 can now be a part of a very sophisticated page similar to a multi-level marketing report, shown in the list to request features from tree2.
2) Is there any way to just display the level below the root and NOT to
display the root as default display? This will save user 1 click and
premium space on a web page.
Yes. Use showRootNode=false. That will be more obvious once we have some documentation in place. :-)
Following is our solution. I look for comments/suggestions from others, especially from Craig. Hope this may help others as well.3) Currently, the TreeBackend.java harcodes the treeData. Is there any
thought (1) to use IoC configuration to set the treeData content for the
default and (2) the content will be updated from the database and make
tree2 immediately responses to the new content?
I would defnitely not hardcode the data in a real application. There
are a variety of mechanisms for updating the data but its not
something specific to tree2. Think dataTable and apply the same
solution to tree2. As for refreshing with new data that will happen
during renderResponse (same as a dataTable.) There is no way to
"push" the new tree obviously because we're talking HTML which is a
request/response model.
There is a report somewhere about the limitation of Jsf lifecycle to reload the content of its backing beans in session scope. One suggested solution is to programmatically delete the backing bean and reload it with new content. I do not use this approach.
Rather, i use Struts-Shale DialogController as backing bean and ViewController to control the initial state of the DialogController. In this way, the same DialogController will be able to serve different contents from ViewController. A good thing is that i am able to implement this mechanism as nested tabs using current myfaces tiles viewHandler :-).
BaTien DBGROUPS
HTH, sean
BaTien

