 |
|
Oracle Database Tips by Donald Burleson |
Building
Tabular Forms with APEX
A tabular form enables the editing of multiple
records of a table or view all at once. Submitting the form will then
perform updates or deletes on all the modified rows in the tabular
form. Editing lookup tables is an excellent use for Tabular Forms.
This exercise will create a tabular form on the
CONFERENCE_RSVP table. The
COMPANY column will purposely be left out again so it can be added in
a different section.
1.
To create the tabular form, navigate to the Easy HTML DB Book
application's home page and click the Create Page button.
2.
Choose the Form option and click Next.
3.
Choose the Tabular Form option and click Next.
4.
On the Table / View Owner page:
·
Table / View Owner: EASYHDB.
·
Allowed Operations: Allow all, UPDATE, INSERT and
DELETE.
·
Click Next.
5.
On the Table/View Name page type in CONFERENCE_RSVP or select
it using the popup from the icon.
Then click Next.
6.
On the Displayed Columns page:
·
Select all columns except for the
ID and COMPANY columns. The
COMPANY column will be added later in another exercise. In this case,
displaying the ID column is not desirable since it is the primary key
column.
The ID and
COMPANY columns can be deselected by holding down the Control key and
clicking on them.
·
Click Next.
7.
On the Primary Key page:
·
Primary Key: ID
There are only
two selections. The form wizards used Automatic Row processes that
only support the use of two column primary keys, so two columns can be
chosen here. Tables that have more that two column primary keys would
require custom programming and advanced use of the APEX API. That
explanation is beyond the scope of the book.
·
Click Next.
8.
On the Primary Key Source page:
·
Choose the Existing trigger option.
·
Click Next.
9.
On the Updateable Columns page select all columns and click
Next.
To keep a column from being editable in
the Tabular Form, it would be de-selected here.
10.
On the Page and Region Attributes page:
·
Page: 1081.
·
Page Name: Tabular Form - CONFERENCE_RSVP.
·
Region Title: Conference Attendees.
·
Region Template: Leave the default of Report Region.
·
Report Template: Leave the default of template:
Standard.
·
Click Next.
11.
No tabs and click Next.
12.
On the Button Labels page leave the defaults and click Next.
13.
On the Branching page leave the defaults and click Next.
14.
Finally, click Finish then Run the page.
Figure 8.13 shows the completed page as it is
now. Later, the COMPANY
column will be added.
The above book excerpt is from:
Easy HTML-DB
Oracle Application Express
Create
Dynamic Web Pages with OAE
ISBN 0-9761573-1-4
Michael Cunningham & Kent Crotty
http://www.rampant-books.com/book_2005_2_html_db.htm |