How to Create a New Task Type

28-20 Web User Interface Developers Guide for Oracle Application Development Framework To identify specific dates as nonworking days: 1. In the Structure Window, right-click a Gantt chart and choose Go to Properties. 2. In the Property Inspector, select the Appearance attributes category. 3. In the nonWorkingDays field, enter the string of dates that you want to identify as nonworking days. For example: 2008-07-04 2008-11-28 2008-12-25. Alternatively, for more flexibility, you can create a method in a backing bean to programmatically identify the nonworking days. For example, if you put the code in a backing bean in a method called getNonWorkingDays, then the setting for the nonWorkingDays attribute becomes: {myBackingBean.nonWorkingDays}. 4. Optionally, specify a custom color in the nonWorkingDaysColor field. The value you enter for this attribute must be a hexadecimal color string.

28.8.2 How to Apply Read-Only Values to Gantt Chart Features

User interactions with a Gantt chart can be customized to disable features by setting the featuresOff property to specify read-only values. Table 28–5 shows the valid values and the disabled feature for the Gantt chart types. To set read-only values on Gantt chart features: 1. In the Structure window, right-click the Gantt chart node and choose Go to Properties .

2. In the Behavior attributes category of the Property Inspector, for the

featuresOff attribute, enter one or more String values to specify the Gantt chart features to disable. For example, to disable user interactions for editing the data model, printing, or changing the zoom level of a Gantt chart, use the following setting for the featuresOff attribute: edit print zoom Alternatively, you can create a method in a backing bean to programmatically identify the features to be disabled. For example, if you put the code in a backing Table 28–5 Valid Values for Read-Only Attributes Value Feature Disabled clipboard Cut, copy, and paste tasks for all Gantt charts. edit Changes to the data model for all Gantt charts. indenting Indent and outdent tasks for project and scheduling Gantts charts. legend Hide and show legend and task information for all Gantt charts. linking Link and unlink tasks for scheduling Gantt charts. print Print task for all Gantt charts. properties Show property dialogs for all Gantt charts. split Split task for project Gantt. undo Undo and redo tasks for all Gantt charts. view Show as list, Show as hierarchy, Columns, Expand and Collapse tasks for all Gantt charts. zoom Changes to the zoom level for all Gantt charts. Using ADF Gantt Chart Components 28-21 bean in a method called whatToTurnOff that returns a String array of the values, then the setting for the featuresOff attribute becomes: {BackingBean.whatToTurnOff}.

28.8.3 Customizing the Time Axis of a Gantt Chart

Every Gantt chart is created with a major time axis and a minor time axis. Each time axis has a facet that identifies the level of the axis as major or minor. The default time axis settings for all Gantt charts are: ■ Major time axis: Weeks ■ Minor time axis: Days You can customize the settings of a time axis. However, the setting of a major axis must be a higher time level than the setting of a minor axis. The following values for setting the scale on a dvt:timeAxis component are listed from highest to lowest: ■ twoyears ■ year ■ halfyears ■ quarters ■ twomonths ■ months ■ twoweeks ■ weeks ■ days ■ sixhours ■ threehours ■ hours ■ halfhours ■ quarterhours Example 28–18 shows sample code to set the time axis of a Gantt chart to use months as a major time axis and weeks as the minor time axis. Example 28–15 Gantt Chart Time Axis Set to Months and Weeks f:facet name=major dvt:timeAxis scale=months f:facet f:facet name=minor dvt:timeAxis scale=weeks f:facet The time units you specify for the major and minor axes apply only to the initial display of the Gantt chart. At runtime, the user can zoom in or out on a time axis to display the time unit level at a different level.