Why this adapter though Richfaces or Primefaces already implements> tree components ? Because dynatree has more features, is more mature, robust and is a prooven component.
Source code and sample are available on https://github.com/nithril/dynatree-for-jsf
Sample is running on Cloudbees at http://dynatree.nithril.cloudbees.net/tree.jsf
FeaturesThis adapter handles events for all of the dynatree events. All events can be mapped to JSF ajax events.
Here is a typical use of the adapter
onLazyRead and onActivate ajax events are binded to methods of the managed bean treeBean.
- lazyRead populates the tree dynamicaly.
- activate refresh a JSF panel with the selected node key.
This project does not include jquery, nor dynatree. You should include their by yourself.
ExampleI have create an example with an infinite ajax tree
Browse to http://localhost:8080/tree/tree.jsf