Showing posts from January, 2007

ADF Faces Tree Component Example

There are a number of questions on OTN regarding the Tree Component. We hope this post will be helpful in answering some of them.

You can download the sample application from here. The application is developed in JDeveloper and uses the HR schema.

The sample application contains four simple examples on how to use the ADF Faces tree component;

1) How to set the focus of the tree to the node that is clicked.

2) How to detect the type of the node that is clicked.

3) How to use the polymorphic restriction functionality.

4) How to change the tree state in a managed bean.

Sample Application

The application contains a tree that is showing the regions, countries and locations in a hierarchical order.

Polymorphic Restriction
This hierarchy is altered only for the Americas region to showcase the polymorphic restriction capability of the tree binding. Polymorphic Restriction is used if the nodes from the same Data Collection Definition should have different child nodes. In the sample tr…