Database Reference
In-Depth Information
One of the most common types of form in APEX is the form on a table. The APEX
Form on a Table Wizard automatically creates and maps APEX items to database
columns, making it trivial to quickly create forms for database table entry and update.
As a developer, you can then modify the different types of controls for each column.
All of the supported HTML widgets (text fields, text areas, select lists, radio groups,
check boxes, and so on) are available, as well as several APEX-specific ones. The best
way to understand just what the APEX Form on a Table Wizard does is use it, so let's
dive in and create a form on a table.
Creating a Form on a Table
In this section you create Page 2 of your Help Desk system and add a form to it. This
form allows the user to create a new ticket by inserting a row into the
TICKETS
table.
You can limit which DML operations a form in APEX can perform. In this case, you
restrict it to only performing inserts.
The Form on a Table Wizard walks through all the steps required to generate a form
on a table: selecting the parsing schema, selecting the table on which to base the form,
selecting the columns to include and edit, assigning region and form titles, and specify-
ing column headings. Begin as follows:
1.
Run
your Help Desk application.
2.
Click
Create
in the
Developer toolbar
at the bottom of the screen.
3.
Select
New Page
, and click
Next
.
4.
Select
Form
, and click
Next
.
5.
Select
Form on a Table or View
, and click
Next
.
6.
Set
Table/View Owner
to your schema, and select
TICKETS (table)
for
Table/View Name
, as shown in
Figure 6-2
. Click
Next
.
Figure 6-2.
Entering the schema and table name