Database Application Developer
BROWSER-BASED B Y DAVID PEAKE
User-Built Applications
Oracle Application Express 4.0 Websheets enable
end users to integrate, share, and maintain content.
ORACLE APPLICATION EXPRESS 4.0
The Websheets feature in Oracle Application Express 4.0 gives business
users a quick and simple way to integrate,
interact with, and share data and other
content on the Web. By using SQL tags,
declarative database reports, and data
grids, users can control the content and
structure of Websheet applications without
relying on developers.
In this column, you’ll build a Websheet
application that integrates existing data
from the sample database application in
Oracle Application Express with data you
enter locally in a data grid. You can run
through these steps on the hosted instance
of Oracle Application Express 4.0 at apex
. oracle.com. ( You must request a free work-space to use this hosted instance.)
If the sample database application is not
already installed, go to Application Builder
-> Create, select Sample Applications, and
click Install next to the Sample Database
application image.
In the
8. SQL section, select Yes for Allow
SQL Tags and Reports and then click
Apply Changes.
Click the
9. Run icon.
Enter your Oracle Application Express
10.
developer credentials, and click Login.
Your browser now displays the home page
for a new Websheet application entitled
Magazine. Next you’ll add some data to it.
phone_number1 Phone,
cust_email Email
from demo_customers
order by cust_last_name]]
MODIFYING WEBSHEET PAGES
Follow these steps to add data from the
sample database application’s Customers
table to the Magazine application:
Enter
2.
CREATING A WEBSHEET
You’ll start by creating a Websheet and
adding existing database content to it via
SQL tags as well as a declarative report. To
create a Websheet, follow these steps:
From the Oracle Application Express
1.
home page, select Administration.
Click the
2. Websheet Database Objects task.
If the
3. Create Websheet Database Objects
option appears, click that option, click
Continue, and then click Create. (If
instead you see options to remove or
validate Websheet database objects, do
nothing on this page.)
Select
4. Application Builder -> Create.
Select
5. Websheet, and click Next.
Enter
6. Magazine for Name, and enter
Customers for Title for the Home Page
Section. Click Next, and then click Create.
Click the
7. Edit Properties image.
[[SQL: select from demo_customers]]
and click Apply Changes.
Now you’ll add a report to the Websheet.
The report’s datasource is the sample database application’s Products table. Follow
these steps to create the report:
From the menu, click
1. Data -> Create.
Select
2. Report, and click Next.
Select
3. Table for Report Source. Click the
up arrow to the right of Table or View
Name, and select DEMO_PRODUC T_
INFO, enter Product Information
for Report Name, enter PROD for Report
Alias, and click Next.
Click
4. Create. An interactive report listing
products appears.
To limit which columns are displayed,
5.
click Actions -> Select Columns. Select
Product Id, Product Image, Mimetype,
Filename, and Image Last Update. Click
< to move these columns into the Do Not
Display region, and click Apply.
To reorder the records, click
6. Actions
-> Format -> Sort, select Category for
Column 1, select Product Name for
Column 2, and click Apply.
Save the report as the default report.
7.
Click Actions -> Save Report, select As
Default Report Settings for Save, and
click Apply.
in the Content box, and click Apply
Changes. The home page now displays a
customer report.
To improve the look of the report,
3.
click Edit in the top right corner of the
Customers region. Replace the query in
the Content box with
[[SQL: select
cust_first_name||' '||
cust_last_name Name,
cust_city City,
cust_state State,
Figure 1: Navigation section in a Websheet application
ORACLE MAGAZINE SEP TEMBER/OC TOBER 2010