<o:tree> allows the developers to have full control over the markup of a tree
hierarchy by declaring the appropriate JSF components or HTML elements in the markup. The
does namely not render any HTML by itself.
Note that the left menu of this showcase application is also using an
<o:tree> which is
dynamically populated in an application scoped bean based on the structure of the webapp's
folder. See also
App source code,
Page source code and
layout.xhtml source code.
Also note that
ListTreeModel, this is not necessary per se,
but it eases accessing the parent and sister pages in EL as is done in the navigation menu here above,
and the siblings as is done in the quick navigation buttons right above.
showcase.xhtml source code.
In the below editable tree example, all input values are required. Clear some of them and then submit to see proper validation message handling. If all values are valid, then the static tree will also be updated with submitted values. You can also dynamically add/remove nodes.
- 0_0 Two
- 0_1 Three
- 1_0 Five