 |
|
Oracle Database Tips by Donald Burleson |
Add Rows
to a Tabular Form Process in APEX
The Add Rows to
a Tabular Form process is used to go to the end of the records set for
the Tabular Form and open a new row for editing. There is no Multi
Row Insert process because the MRU also takes care of the Inserts.
Adding a Column to a
Tabular Form
This section will show how to add another column
to the tabular form so it can also participate in the Multi Row
processes for updating to the database.
Since the Tabular Form is a variation of the
APEX
Report, its population is done via a SQL Select statement in the
Region Definition.
1.
To start, modify the Select statement that populates the
Tabular Form. Navigate to the Page Definition screen and click on the
Conference Attendees link to edit the Region Definition.
2.
On the Region Definition page, modify the region source and add
the COMPANY column. The Select statement should then look something
like this:
select
"ID",
"LAST_NAME",
"FIRST_NAME",
"EMAIL",
"PHONE",
"COMPANY",
"RSVP_DATE",
"DONATION",
"PAYMENT"
from "#OWNER#"."CONFERENCE_RSVP"
3.
After modifying the region source, click the Apply Changes
button.
At this point, it would be useful to run
the page. The Company column is now there, but it is not editable.
The next step is to make the column editable and to configure it to
participate in the Multi Row processes.
4.
Click on the Edit Page 1081
link in the developer toolbar to get back to the Page Definition
screen.
5.
Click on the Report link for
the Conference Attendees region. This will navigate to the Report
Attributes page.
6.
On the Report Attributes page, click on the edit icon next to
the COMPANY column.
7.
On the Column Attributes page, scroll down to the Tabular Form
Element section and make the following changes. The completed changes
are shown in Figure 8.15.
§
Display As: Text Field.
§
Reference Table Owner:
EASYHDB.
§
Reference Table Name: CONFERENCE_RSVP.
This must be the
same as the table name in the MRD and MRU processes.
§
Reference Column Name: COMPANY.
§
Click Apply Changes.
Run the page to see the changes to the Tabular
Form. New developers are encouraged to make some data changes and try
out the various functions on the page.
The preceding sections have shown how to create a
tabular form, how to add a column to a tabular form, how to make it
editable, and have it participate in the Multi Row processes. It also
showed what the role of a Multi Row processes is in a Tabular Form.
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 |