How to Change the Gantt Chart Time Scale

28-12 Web User Interface Developers Guide for Oracle Application Development Framework

28.4.3 Data for a Scheduling Gantt Chart

The data model for a scheduling Gantt chart supports hierarchical data and uses TreeModel to access the data in the underlying list. The specific model class is org.apache.myfaces.trinidad.model.TreeModel. The collection of objects returned by TreeModel must have, at a minimum, the following properties: ■ resourceId: The ID of the task. ■ tasks: A collection of task objects for this resource. Optionally, the object could implement the oracle.adf.view.faces.bi.model.ResourceTask interface to ensure it provides the correct properties to the Gantt chart. The collection of objects returned by the tasks property must also have the following properties: ■ taskId: The ID of the task. ■ startTime: The start time of the task. ■ endTime: The end time of the task. When binding the data to an ADF data control, the scheduling Gantt chart has a Resource node definition. The Resource node has the following types of accessors: ■ subResources: Returns a collection of subresources for the current resource. This accessor is optional. ■ tasks: Returns a collection of tasks for the current resource. This accessor is required. Tasks can also include a splitTask accessor. Table 28–4 shows a complete list of data object keys for a scheduling Gantt chart. Table 28–4 Data Object Keys for Scheduling Gantt Charts Data Object Key Data Type and Description Dependency node A list of dependencies for a task. Data object keys for dependencies include: ■ fromId: The ID of the task where the dependency begins. ■ toId: The ID of the task where the dependency ends. ■ type: The type of the dependency. Valid values are start-start, start-finish, finish-finish, finish-start, start-before, start-together, finish-after, and finish-together. endTime required Date. The end time for the all tasks. icon1 String. The first icon associated with the task bar for all tasks. The icon might change depending on other attributes. icon2 String. The second icon associated with the task bar for all tasks. icon3 String. The third icon associated with the task bar for all tasks. iconPlacement String. The alignment of the icon in the task bar for all tasks. Valid values are left default, right, inside, inside_left, inside_right, and inside_center. isContainer Boolean. Specifies whether or not a node definition is a container. label String. The label associated with the task bar for all tasks. Using ADF Gantt Chart Components 28-13

28.5 Creating an ADF Gantt Chart

You can use any of the following data sources to create an ADF Faces Gantt chart component: ■ ADF Data Controls: You declaratively create a databound Gantt chart by dragging and dropping a data collection from the ADF Data Controls panel. You can create a Gantt chart using a data collection that provides row set data as described in the Creating Databound ADF Gantt Charts section in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Data Model: You programmatically specify the data model for the Gantt chart by providing an EL expression that references a backing bean method using the value attribute of the Gantt tag.

28.6 Customizing Gantt Chart Legends, Toolbars, and Context Menus

You can modify default Gantt chart features including the information panel and legend that are displayed below the Gantt chart, menu bar options and toolbar buttons, and the popup menu that is displayed when you right-click in the Gantt chart table or chart regions.

28.6.1 How to Customize a Gantt Chart Legend

The optional Gantt chart legend subcomponent includes an area that displays detailed information about the selected task, or metrics about the selected time bucket, and a legend that displays the symbol and color code bar used to represent each type of task in a Gantt chart. At runtime, users can hide or show the information panel using a toolbar button. The dvt:ganttLegend tag must be added as a child of the Gantt chart tag in order to provide the legend areas. The content of the legend areas is automatically generated based on the properties for each type of task registered with the taskbarFormatManager. labelPlacement String. The alignment of the label in the task bar for all tasks. Valid values are left default, right, inside, inside_left, inside_right, and inside_center. Recurring tasks node A list of recurring tasks for all tasks. resourceId required String. The unique identifier of a resource. Split tasks node A collection of tasks without a continuous time line for all tasks. startTime required Date. The start time for all tasks. startupTime Date. The startup time before a task begins. Tasks node required A list of tasks associated with a resource. taskId required String. The unique identifier of the task for all tasks. taskType String. The type of the task for all tasks. workingDaysOfTheWeek Object. A list of the working days of the week. workingEndTime Date. The work end time for the resource. workingStartTime Date. The work start time for the resource. Table 28–4 Cont. Data Object Keys for Scheduling Gantt Charts Data Object Key Data Type and Description