Comments on: Getting started with ADF Faces in JDeveloper 10.1.3 – Using the Tree Component, comparison with MyFaces Tomahawk Tree2 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/ Friends of Oracle and Java Wed, 27 May 2015 22:00:57 +0000 hourly 1 http://wordpress.org/?v=4.2.2 By: Punit https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2793 Wed, 11 Nov 2009 10:48:05 +0000 http://technology.amis.nl/blog/?p=989#comment-2793 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2792 Wed, 03 Jun 2009 10:00:48 +0000 http://technology.amis.nl/blog/?p=989#comment-2792 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2791 Mon, 18 Jun 2007 22:19:57 +0000 http://technology.amis.nl/blog/?p=989#comment-2791 I have just posted a reworked, more complete and correct version of this article. See http://technology.amis.nl/blog/?p=2094

]]>
By: Dimd80 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2790 Tue, 17 Oct 2006 09:15:44 +0000 http://technology.amis.nl/blog/?p=989#comment-2790 Really helpful your code. I wish i could write such a code!!!
Keep writing! J…Developer Walker

]]>
By: Adam https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2789 Tue, 12 Sep 2006 18:55:29 +0000 http://technology.amis.nl/blog/?p=989#comment-2789 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2788 Sun, 10 Sep 2006 10:46:57 +0000 http://technology.amis.nl/blog/?p=989#comment-2788 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2787 Thu, 07 Sep 2006 12:56:15 +0000 http://technology.amis.nl/blog/?p=989#comment-2787 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2786 Thu, 31 Aug 2006 07:30:43 +0000 http://technology.amis.nl/blog/?p=989#comment-2786 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.

Regards,
Ric

]]>
By: shivkumar https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2785 Mon, 24 Apr 2006 10:55:56 +0000 http://technology.amis.nl/blog/?p=989#comment-2785 how can i use checkbox at each tree node, can u please tell me how to do it?

]]>
By: Michal https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2784 Fri, 21 Apr 2006 18:19:25 +0000 http://technology.amis.nl/blog/?p=989#comment-2784 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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2783 Fri, 21 Apr 2006 18:15:24 +0000 http://technology.amis.nl/blog/?p=989#comment-2783 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:

———————————————-
faces-config.xml:

oracle.adf.core

tree2
sk.skulm.gen.tree2.Tree
session

———————————————-
Tree.java:

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;
import oracle.adf.view.faces.component.core.data.CoreTree;

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();
list_0.add(node_0_0);
list_0.add(node_0_1);
list_0.add(node_0_2);
list_0.add(node_0_3);
list_0.add(node_0_4);
list_0.add(node_0_5);
node_0.setChildren(list_0);

ArrayList list_0_0 = new ArrayList();
list_0_0.add(node_0_0_0);
list_0_0.add(node_0_0_1);
node_0_0.setChildren(list_0_0);

ArrayList list_0_0_0 = new ArrayList();
list_0_0_0.add(node_0_0_0_0);
node_0_0_0.setChildren(list_0_0_0);

ArrayList list_0_1 = new ArrayList();
list_0_1.add(node_0_1_0);
list_0_1.add(node_0_1_1);
node_0_1.setChildren(list_0_1);
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;
}
}

———————————————-
TreeNode.java:

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 https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2782 Thu, 20 Apr 2006 21:19:29 +0000 http://technology.amis.nl/blog/?p=989#comment-2782 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 adf-faces-10_1_3_0_4.zip download but the one with selecting value functionality was rather too complex for a newbie like me…

Michal

]]>
By: Chintan https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2781 Sun, 19 Mar 2006 01:20:38 +0000 http://technology.amis.nl/blog/?p=989#comment-2781 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.

Thanks,
Chintan

]]>
By: Deep Forest https://technology.amis.nl/2006/01/06/getting-started-with-adf-faces-in-jdeveloper-1013-using-the-tree-component-comparison-with-myfaces-tomahawk-tree2/#comment-2780 Thu, 12 Jan 2006 09:39:51 +0000 http://technology.amis.nl/blog/?p=989#comment-2780 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,

Regards,
Sagi

]]>