Comments on: Getting started with ADF Faces in JDeveloper 10.1.3 – Using the Tree Component, comparison with MyFaces Tomahawk Tree2 Friends of Oracle and Java Wed, 27 May 2015 22:00:57 +0000 hourly 1 By: Punit Wed, 11 Nov 2009 10:48:05 +0000 Hi,

Thanks a bunch for this application.It proved to be very useful.Do u have any idea about how to highlight the selected node

By: Dev Wed, 03 Jun 2009 10:00:48 +0000 HI Lucas Jellema,

This Article on Tree Component is very useful. Thank you very much for the same.

Can I have a similar approach on using JDeveloper 11G as some of the Classes used in jDev10.1.3 is depricated in 11G.

Thank you … Dev

By: Lucas Jellema Mon, 18 Jun 2007 22:19:57 +0000 I have just posted a reworked, more complete and correct version of this article. See

By: Dimd80 Tue, 17 Oct 2006 09:15:44 +0000 Really helpful your code. I wish i could write such a code!!!
Keep writing! J…Developer Walker

By: Adam Tue, 12 Sep 2006 18:55:29 +0000 Thank you so much for the tree example. I was able to use it successfully. In using GenericTreeNode, I was unable to use Michal’s or Chintan’s suggestion. The error was in the jsp file in still needing to output the longdescription. Thanks you again.

By: Nuruthin Ahammed Sun, 10 Sep 2006 10:46:57 +0000 Your article was very help ful to create tree components using ADF Faces. But my aim is to create treeTable component by fetching records from DEPARTMENT & EMP tables. But I am not using JDeveloper. Using eclipse for file creation and tomcat to run the application. How can I add all details of employee as columns in tree table. Actually the treeTable should show the DEPARTMENTS. When click on Departments it should expand to show the Employees along with all the details in the same row, but in separate columns.

By: Nuruthin Ahammed Thu, 07 Sep 2006 12:56:15 +0000 I want to make treeTable demo application which will give the drilldown facility. What changes should I give to implement this facility.

By: Ric Smith Thu, 31 Aug 2006 07:30:43 +0000 This is a fantastic post! I would just like to add that if you override the isContainer method on your TreeModel that you can display leave nodes. Thanks for your time and consideration. Hope that is helpful.


By: shivkumar Mon, 24 Apr 2006 10:55:56 +0000 how can i use checkbox at each tree node, can u please tell me how to do it?

By: Michal Fri, 21 Apr 2006 18:19:25 +0000 Ok, it didn’t processed ok the jspx file and faces-config.xml but that certainly is not anything complicated to produce one of your own.

By: Michal Fri, 21 Apr 2006 18:15:24 +0000 The original example has a slight problem that it displays as a parent node even nodes without children – Chintan’s suggestion solves the problem, code looks like this:
.jspx file:





package sk.skulm.gen.tree2;
import oracle.adf.view.faces.model.ChildPropertyTreeModel;
import java.util.ArrayList;
import sk.skulm.gen.tree2.TreeNode;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;

public class Tree{
private ChildPropertyTreeModel model;
private String selectedNodeLabel = null;
private CoreTree tree;

public Tree() {
TreeNode node_0 = new TreeNode(“node_0″);
TreeNode node_0_0 = new TreeNode(“node_0_0″);
TreeNode node_0_0_0 = new TreeNode(“node_0_0_0″);
TreeNode node_0_0_0_0 = new TreeNode(“node_0_0_0_0″);
TreeNode node_0_0_1 = new TreeNode(“node_0_0_1″);
TreeNode node_0_1 = new TreeNode(“node_0_1″);
TreeNode node_0_1_0 = new TreeNode(“node_0_1_0″);
TreeNode node_0_1_1 = new TreeNode(“node_0_1_1″);
TreeNode node_0_2 = new TreeNode(“node_0_2″);
TreeNode node_0_3 = new TreeNode(“node_0_3″);
TreeNode node_0_4 = new TreeNode(“node_0_4″);
TreeNode node_0_5 = new TreeNode(“node_0_5″);

ArrayList list_0 = new ArrayList();

ArrayList list_0_0 = new ArrayList();

ArrayList list_0_0_0 = new ArrayList();

ArrayList list_0_1 = new ArrayList();
this.model = new ChildPropertyTreeModel(list_0, “children”);

public ChildPropertyTreeModel getModel()
{ return this.model;

public void setModel(ChildPropertyTreeModel model)
{ this.model = model;

public void process(ActionEvent event) throws AbortProcessingException {
this.selectedNodeLabel = ((TreeNode)model.getRowData()).getLabel();

public void setSelectedNodeLabel(String selectedNodeLabel) {
this.selectedNodeLabel = selectedNodeLabel;

public String getSelectedNodeLabel() {
return this.selectedNodeLabel;

public void setTree(CoreTree tree) {
this.tree = tree;

public CoreTree getTree() {
return this.tree;


package sk.skulm.gen.tree2;
import java.util.ArrayList;

public class TreeNode {
private ArrayList children;
private String label;

public TreeNode(String label) {
this.label = label;

public void setChildren(ArrayList children)
{ this.children = children;

public ArrayList getChildren()
{ return this.children;

public void setLabel(String label)
{ this.label = label;

public String getLabel()
{ return this.label;

By: Michal Thu, 20 Apr 2006 21:19:29 +0000 Thanks for the example, after searching days for a simple adf faces tree sample really appreciate yours here.
There are also tree examples in adf-faces-demo.war packed in download but the one with selecting value functionality was rather too complex for a newbie like me…


By: Chintan Sun, 19 Mar 2006 01:20:38 +0000 Hi,
Your example is quite useful. But in order to get selected node in ADF faces, you don’t need to have HTTP parameter. You can easily bind table with backing bean table using BINDING variable of table and then just use get method : here is the sample code:

In backing bean:
private CoreTree bookTree; with getter and setters.

In actionEvent:
this.selectedNode = ( (GenericTreeNode) bookTree.getRowData() );
Here you don’t need find method either.

and this concept is from JSF faces, isn’t it?
let me know your comments.


By: Deep Forest Thu, 12 Jan 2006 09:39:51 +0000 Hey, this page was VERY HELPFUL for me.

You shell also consider build the Library in the faces-config, as managed-beans,
I didn’t find an example that will help me modify my app to use it (I try to use menuTabs, as in an example of Oracle, but it required menuModel and menuTree, so I bypassed it using your example. But they used the managed-beans for the content, and I want to do so too)

If you have link or instructions how to do it you are most welcome to write me,