Application Builder includes a built-in wizard for generating a calendar with monthly, weekly, and daily views. Once you specify the table on which the calendar is based, you can create drill-down links to information stored in specific columns. Note that Oracle Application Express supports the creation of only one calendar per page.
Topics in this section include:
Application Builder supports two calendar types:
Easy Calendar creates a calendar based on schema, table, and columns you specify. The wizard prompts you to select a date column and display column.
SQL Calendar creates a calendar based on a SQL query you provide. The SQL SELECT statement you provide must include at least two columns: a date column and display column.
See Also:
"Calendar Display"Application Builder supports a number of date format substitution strings. You can view a complete list of supported substitution strings on the Calendar Templates page.
To view a list of supported substitution strings for calendars:
Navigate to the appropriate calendar template.
View the Substitution Stings list on the right side of the page.
See Also:
"Managing Themes"How you create a calendar depends on if you are adding a calendar to an existing page or adding a calendar on a new page. When creating calendars remember:
You can only create one calendar for each page. The calendar includes daily, weekly, and monthly views.
The date column determines which days on the calendar will contain entries.
The display column defines a specific row that will display a calendar date.
Topics in this section include:
Tip:
In Oracle Application Express release 3.1, the Create Calendar Wizard includes a new Display Type option. Standard submits the page along with the associated request. Partial Page Refresh only refreshes the Calendar region. Once the calendar is created, the display type cannot be changed. To change the display type, you must delete the calendar and then re-create it.Oracle Application Express supports the creation of one calendar per page.
To add a calendar to an existing page:
Navigate to the Page Definition. See "Accessing a Page Definition".
Under Regions, click the Create icon.
Select Calendar and click Next.
Select the type of calendar you want to create and click Next:
Easy Calendar creates a calendar based on the date column and display column you specify.
SQL Calendar creates a calendar based on a SQL query you provide.
Follow the on-screen instructions.
To create a calendar on a new page:
Navigate to the Workspace home page.
Click the Application Builder icon.
Select an application.
Click Create Page.
Select Calendar and click Next.
Select the type of calendar you want to create and click Next:
Easy Calendar creates a calendar based on the date column and display column you specify.
SQL Calendar creates a calendar based on a SQL query you provide.
Follow the on-screen instructions.
See Also:
"Editing Calendar Attributes"The title that appears at the top of calendar corresponds to the region title.
To alter the region title:
Navigate to the Page Definition. See "Accessing a Page Definition".
Under Regions, select the region name.
The Region Definition appears.
Under Identification, enter a title.
Click Apply Changes.
Once you create a calendar, you can alter the display by editing attributes on the Calendar Attributes page.
Note that to disable a view of a calendar, you must delete the Monthly, Weekly, or Daily buttons on the calendar page.
Topics in this section include:
To access the Calendar Attributes page:
Navigate to the appropriate Page Definition. See "Accessing a Page Definition".
Under Regions, click Calendar next to the region name.
The Calendar Attributes page appears.
Edit the appropriate attributes. To learn more about a specific item on a page, click the item label.
When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark.
Click Apply Changes.
The Calendar Attribute page is divided into sections.
You can access these sections by scrolling down the page, or by clicking a navigation button at the top of the page. When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.
The topics that follow describe specific sections of the Calendar Attributes page. You can use these attribute to specify general calendar formatting, define the dates included in the calendar, or create a link on the column or a day in the calendar.
Use Calendar Display to specify a calendar template, date columns, and general calendar formatting.
Calendar Template determines what template is used when the Application Express engine renders a calendar. Date Column defines the column from the table or query containing the dates to be placed on the calendar. Date Item defines the item which holds the date on which the calendar is based. Calendar Type Column specifies the item which holds the calendar type. Display Type defines the display type. Options include: Column, Custom, or No Display Value. Display Column defines a specific row that displays on a calendar date. If Display Type is set to Column, use Display Column to select the column to display in the day cell of the monthly calendar.
To select another Display Column:
Navigate to the appropriate Calendar Attributes page.
Locate the Calendar Display section.
To specify another display column, make a selection from the Display Column list.
Click Apply Changes.
To specify a custom Display Column:
Navigate to the appropriate Calendar Attributes page.
Locate the Calendar Display section.
From Display Type, select Custom.
In Column Format, enter a custom column format. You can use an HTML expression and supported substitution strings.
Click Apply Changes.
Use Display Attributes to define the dates that are included in the calendar.
Begin at Start of Interval determines when the calendar should start. Selecting this option creates a calendar that spans an entire interval (such as a month). For example:
If Begin at Start of Interval is selected, the date is June 15th, and the display is monthly, the resulting calendar spans from June 1st to June 30th.
If Begin at Start of Interval is not selected, the date is June 15th, and the display is monthly, the resulting calendar spans from June 15th to June 30th.
The next two attributes define which items hold the calendar start date and end date. You can use these attributes to create calendars that span multiple months at a time. Note that the format of the date of either item must be YYYYMMDD
:
Item Containing Start Date points to an item that holds the start date of the calendar.
Item Containing End Date points to an item that holds the end date of the calendar.
Start of Week for Monthly Calendar determines the day on which the calendar starts for the monthly view.
Start Day for Weekly Calendar determines the day on which the calendar starts for the weekly view.
End Day for Weekly Calendar determines the day on which the calendar ends for the weekly view.
Time Format determines if the time displays in a 12-hour or 24-hour format.
Start Time and End Time determine the start and end times to display in the weekly and daily calendar views.
Use Column link to create a link on the column in the calendar.
To create a column link to another page:
Navigate to the appropriate Calendar Attributes page.
Scroll down to Column Link.
From Target is a, select Page in this Application.
In Page, specify the target page number. To reset the pagination for this page, select reset pagination for this page.
In Request, specify the request to be used.
In Clear Cache, specify the pages (that is, the page numbers) on which to clear cache. Specify multiple pages by listing the page numbers in a comma-delimited list.
You can set session state (that is, give a listed item a value) using the next two attributes: the Set these items attribute and the With these values attribute.
To set session state:
Set these items - Enter a comma-delimited list of item names for which you would like to set session state.
With these values - Enter a comma-delimited list of values for the items specified in the previous step.
You can specify static values or substitution syntax (for example, &APP_ITEM_NAME.
). Note that item values passed to f?p=
in the URL cannot contain a colon (:). Additionally, item values cannot contain commas unless you enclose the entire value in backslashes (for example, \1234,56\
).
Click Apply Changes.
To create a column link to a URL:
Navigate to the appropriate Calendar Attributes page.
Scroll down to Column Link.
From Target is a, select URL.
In URL, enter the appropriate address.
Click Apply Changes.
Use Day link to create a link on a day in the calendar. This attribute creates a link on an actual number (or day) on the calendar.
To create a day link to another page:
Navigate to the appropriate Calendar Attributes page.
Scroll down to Day Link.
From Target is a, select Page in this Application.
In Page, specify the target page number.
To reset the pagination for this page, select reset pagination for this page.
In Request, specify the request to be used.
In Clear Cache, specify the pages (that is, the page numbers) on which to clear cache. Specify multiple pages by listing the page numbers in a comma-delimited list.
You can set session state (that is, give a listed item a value) using the next two attributes: Set these items and With these values.
To set session state:
Set these items - Enter a comma-delimited list of item names for which you would like to set session state.
With these values - Enter a comma-delimited list of values for the items specified in the previous step.
You can specify static values or substitution syntax (for example, &APP_ITEM_NAME.
). Note that item values passed to f?p=
in the URL cannot contain a colon (:). Additionally, item values cannot contain commas unless you enclose the entire value in backslashes (for example, \1234,56\
).
Click Apply Changes.
To create a day link to a URL:
Navigate to the appropriate Calendar Attributes page.
Scroll down to Day Link.
From Target is a, select URL.
In URL, enter the appropriate address.
Click Apply Changes.
By default, calendars you create in Oracle Application Express 3.0 include daily, weekly, and monthly views. To update calendars created in a previous release to include these views, you can either:
Create a calendar:
Create a calendar page and integrate the SQL query from your previous calendar.
Replace the previous calendar page with the new one in your application.
Upgrade the theme:
Change the identification number of the existing theme. See "Changing a Theme Identification Number".
Re-create the theme. See "Creating a Theme".
Apply the new theme to your application. See "Switching the Active Theme".
Creating an Easy Calendar is the simplest way to create a calendar. However, if you find the resulting calendar does not meet your needs, you can quickly convert it to a SQL Calendar.
To convert an Easy Calendar to a SQL Calendar:
Navigate to the Page Definition. See "Accessing a Page Definition".
Under Regions, click Calendar next to the region name.
The Calendar Attributes page appears.
On the Tasks list, click Convert to SQL Based calendar.
Converting an Easy Calendar to a SQL Calendar adds a Region Source section to the Region Definition. The Region Source contains the original SQL query that creates the calendar. By accessing the Region Source, you can edit the query to meet your needs.