24.5.2 Managing Calendars in Legacy Component View

Important:

Legacy Component View is disabled by default. To enable Legacy Component View, edit your user preferences.

Once you create a legacy calendar, you can alter the display by editing attributes. Each calendar has two sets of editable attributes: region attributes and calendar attributes. Region attributes define the area of the page which functions as a container for the calendar. Calendar attributes specify the template, date columns, and general calendar formatting.

Topics:

24.5.2.1 Editing Calendar Attributes in Component View

Once you create a calendar, you can alter the display by editing attributes. Each calendar has two sets of editable attributes: region attributes and calendar attributes. Region attributes define the area of the page which functions as a container for the calendar. Calendar attributes specify the template, date columns, and general calendar formatting.

Tip:

To disable a view of a calendar, you must delete the Monthly, Weekly, or Daily buttons on the calendar page.

To access Calendar attributes:

  1. Navigate to the appropriate page. See .
  2. Access the Region Definition page. Under Region, select the region name.

    The Region Definition appears. Use these attributes to alter the container that holds the calendar, including the region title.

  3. Click Calendar Attributes.

    The Calendar Attributes page appears.

  4. Edit the appropriate attributes.

    To learn more about an attribute, see field-level Help.

  5. Click Apply Changes.

24.5.2.2 Editing an Existing Calendar to Include Add and Edit Functionality

When defining calendar create and edit links for Desktop applications, Oracle recommends defining two separate pages. For the page used for creating a new calendar entry the Page Access Protection should to be defined as Unrestricted. However, for the page used for editing existing calendar entries the Page Access Protection should be set to Arguments Must Have Checksum.

To edit an existing calendar to include add and edit functionality:

  1. Navigate to the appropriate Calendar Attributes page.
  2. Scroll down to Create Link or View / Edit Link. Enter the URL.

    For example, a Create Link for a duration based event navigating to Page 3 would be:

    f?p=&APP_ID.:3:&SESSION.::&DEBUG.:RP,3:P3_START_DATE,P3_END_DATE:#APEX$NEW_START_DATE#,#APEX$NEW_END_DATE#:
    

    For example, a View / Edit Link using ROWID for the primary key column, navigating to Page 4 would be:

    f?p=&APP_ID.:4:&SESSION.::&DEBUG.:RP,4:P4_ROWID:&ROWID.:
    

    Tip:

    The selected date column must have a format mask of RRRRMMDDHH24MISS since the calendar passes the date in that format.

    If you do not want to change the format mask of date item, you must create a hidden item (this hidden item should be selected as Date Item which accepts the date value) in the form page with the above format mask.

  3. Scroll up to Calendar Display.

    From Primary Key Column, select the value to be passed when editing calendar data. This value is substituted for the #PRIMARY_KEY_VALUE# specified in the previous step.

  4. Click Apply Changes.

24.5.2.3 Enabling the Dragging and Dropping of Data In an Existing Legacy Calendar

When you create a Legacy calendar on a new page, the Drag and Drop option does not appear. To enable this functionality, you must create the On Demand process, create a Legacy calendar page, and then edit the page to enable drag and drop. As a best practice, Oracle recommends creating this process before creating the calendar.

To enable support for dragging and dropping of calendar data:

  1. Create an On Demand application process.

    This process should execute when the calendar data is dragged and dropped. It should have code similar to the following example:

    declare
        l_date_value         varchar2(32767) := apex_application.g_x01;
        l_primary_key_value  varchar2(32767) := apex_application.g_x02;
    begin
        update EMP set HIREDATE = to_date(l_date_value,'YYYYMMDD HH24MISS') 
         where ROWID = l_primary_key_value;
    end;
    
  2. Navigate to the Calendar Attributes.

  3. Scroll down to Drag and Drop.

  4. From Process, select the custom page process you created in step 1.

  5. Click Apply Changes.