Project Gantt chart using ADF BC

Posted by shantala.sankeshwar on Oracle Blogs See other posts from Oracle Blogs or by shantala.sankeshwar
Published on Wed, 30 Nov 2011 07:50:09 -0600 Indexed on 2011/11/30 18:09 UTC
Read the original article Hit count: 330

Filed under:

This article describes simple example of using Project Gantt chart using ADF Business components.

Use Case Description

Let us create a simple Project Gantt chart using ADF Business components & try to get the selected tasks details.

Implementation steps

A project Gantt chart is used for project management. The chart lists
tasks vertically and shows the duration of each task as a bar on a
horizontal time line.

To create a basic project gantt chart,we first need to define  2 tables as below:
1)task_table with taskid,task_type,start_date & end_date
2)subtask_table with subtaskid,subtask_type,start_date, end_date &  taskid


Now we can create Business components for the above 2 tables .Then we will create new jspx page -projectGantt.jspx


Drop TaskView1 as Gantt->Project:

gantt2.JPG











Select all required columns under tasks & subtasks tabs of 'create Project Gantt chart' dialog.

We have created Project Gantt chart that lists tasks & its subtasks.Now if we need to get all task details selected by the user then define taskSelectionListener for the dvt:projectGantt in jspx source page:

taskSelectionListener="#{test.taskSelectlistener}"


public void taskListener(TaskSelectionEvent taskSelectionEvent) {
// This codes gives all the tasks selected by user

System.out.println("Selected task details +taskSelectionEvent.getTask());
           
}

Run the above page & note that it shows all details of tasks nodes & expanding these tasks nodes shows its corresponding subtasks details.Now if user selects 2 tasks,we can see that it prints the complete task details for the selected tasks.



© Oracle Blogs or respective owner

Related posts about /Oracle/ADF