0% found this document useful (0 votes)
80 views64 pages

APEX Page From Scratch Latest

This document describes how to create an Oracle Application Express (APEX) application that allows users to view, edit, create and delete department records from interactive reports and forms. It includes steps to: 1. Create an interactive report region linked to the DEPT table to display department data. 2. Create a form region to edit department records, linking it to the interactive report using a custom target link. 3. Add buttons to navigate between the report and form, and to perform database actions like inserting, updating, deleting records. 4. Create processing to handle the database actions and reset the form on completion.

Uploaded by

Bayan Marhoon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views64 pages

APEX Page From Scratch Latest

This document describes how to create an Oracle Application Express (APEX) application that allows users to view, edit, create and delete department records from interactive reports and forms. It includes steps to: 1. Create an interactive report region linked to the DEPT table to display department data. 2. Create a form region to edit department records, linking it to the interactive report using a custom target link. 3. Add buttons to navigate between the report and form, and to perform database actions like inserting, updating, deleting records. 4. Create processing to handle the database actions and reset the form on completion.

Uploaded by

Bayan Marhoon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 64

Oracle Application Express

(APEX)
ITCS 495: Report and Form from Scratch
Page from Scratch (Report)
Adding Page from Scratch (Report)
Adding Page from Scratch (Report)
Adding Page from Scratch (Report)
Adding Page from Scratch (Report)
Add Page From Scratch (Report)
Right Click Region (left Pane)
press on Create Region:
Identification (Right Pane)
Name: Department Report
Type: Interactive Report
Source : (One of the following)
Table/ VIEW: DEPT
SQL Query: SELECT * FROM DEPT;
Create New Region
Department Report
Department Report (User View)
Link Column = Link to Single Row View
That means that when you click on the icon view
(modify) records, the application will jump to a default
page (displays record information)
Press on Department Report -> Attributes (Left Pane):
Right Pane:
 Uniquely identify rows By: Unique Column
 Unique Column: DEPTNO
Link Column = Link to Single Row View
Link Column = Link to Single Row View
After pressing on Pen icon:
Page from Scratch (Form)
Page from scratch (Form)
Page from scratch (Form)
Page from scratch (Form)
Note that since this
Form is accessed only
from Page 9 (Report), we
do not create a navigation link
Page from scratch (Form)
Page From Scratch (Form)
Right Click Region (left Pane)
press on Create Region:
Identification (Right Pane)
Title: Department Form
Type: FORM
Source
Type: Table/View
Table Name: Dept
Page From Scratch (Form)
Page From Scratch (Form)
Generated Automatically
Assign Primary Key
Go to the item: P12_DEPTNO
Page Properties:
Identification:
 Type: Hidden (If you do not want to display the field)
Validation:
 Value Required: Click on NO (if you will generate Primary Key
through trigger)
Source
 Primary Key: Click on YES
Assign Primary Key (Identification)
Assign Primary Key (Validation)
Assign Primary Key (Source)
Linking Report Page with
Form Page
Linking the Report Page and Form Page
The user selects a record on Department Report (page
9) to modify, it will be turned to Department page
(page 12) and pass ID of record.
Back to Department Report Page
Link Column = Link to Custom Target
Use to jump to your custom page, to display record
information.
Choose Department Report -> Attributes (Left Pane):
Right Pane:
Link Column: Link to Custom Target
Press on Target
Link Builder: Target
Link Builder – Target: Pick Page
Link Builder – Target: Set Items
Link Builder – Target: Set Items
Press OK
Department Report (Click on Pen Icon)

Department Page (12) Loaded with Sales Department Details


Add Create Button
Department Report Page:
Create a button on the report page for insert
Drag Button to Department Report region
Button name: CREATE
Label: Create
Position: Right of interactive report search bar
Action: Redirect to page in this application
Page: 12 (the DEPT form page)*
Clear cache: 12*
 Create button

* : Dependent of Page of form


Add Create Button
Department Report Page:
Add Create Button to Report Page (9)
(Right of Interactive Report Search Bar)
Button->Behavior->Action
Button -> Behavior-> Action
Button -> Behavior-> Action
Add 5 buttons to Page 12 (Form)
Department Form : Cancel
When you click CANCEL on page 5, the website will go
to Department Report (page 9).
Setting properties for CANCEL button:
Button Name: CANCEL
Label: Cancel
Action: Redirect to Page in this Application
Cancel Button
Linking of Cancel Button
Behavior of Button Cancel
Department Form: Delete Immediately
Button
When click button DELETE_IMMEDIATELY, record will be
delete without prompting. We'll setting attributes for this button:
Button Name: DELETE_IMMEDIATELY
Label: Delete (Immediately)
Behavior:
Action: Submit Page
Database Action: SQL DELETE Action
Server Side Condition (To show the button only if the item
P12_DEPTNO is not NULL):
Condition Type: Item not null
Condition Item: P12_DEPTNO
Department Form: Delete Immediately
Button
Apex.confirm
apex.confirm (text, BUTTON_NAME) is an available
javascript function on APEX
It will display a Dialog requires user confirm action
before executing definition action on
BUTTON_NAME.
This button will display on web page if P12_DEPTNO
is not null (To confirm delete).
Department Form: Delete Confirm Button
When click this button, the application ask user whether want to delete
this record or not.
Set up attributes for DELETE_CONFIRM button:
Button Name: DELETE_CONFIRM
Label: Delete (confirm)
Behavior:
Action: Redirect to URL
Target: javascript:apex.confirm('Are you sure?','DELETE_CONFIRM');
Database Action: SQL DELETE action
Server Side Condition (To show the button only if the item
P12_DEPTNO is not NULL):
Condition Type: Item is NOT NULL
Condition Item: P12_DEPTNO
Department Form: Delete Confirm Button
(Set Target for Pop message to confirm the
deletion of record to avoid accidental
deletion)
Department Form: Delete Confirm Button
Department Form:
SAVE_EDIT Button
This button will display for user to modify available record
on DB (make an Update statement on DB).
Button Name: SAVE_EDIT
Label: Save (edit)
Behavior:
Action: Submit Page
Database Action: SQL UPDATE action
Server Side Condition (To show the button only if the item
P12_DEPTNO is not NULL):
Condition Type: Item is NOT NULL
Condition Item: P12_DEPTNO
Department Form:
SAVE_EDIT Button
Department Form:
SAVE_CREATE Button
Button Name: SAVE_CREATE
Label: Save (create)
Behavior:
Action: Submit Page
Database Action: SQL INSERT action
Server Side Condition (To show the button only if the
item P12_DEPTNO is NULL):
Type: Item is NULL
Item: P12_DEPTNO
Department Form:
SAVE_CREATE Button
Processing of SQL Commands (Insert,
update or delete)
Click on the Icon

Right Click on Processing:


Create Process
Processing
Next, we add 2 Processes:
Process Dept Record: Execute actions
(Insert, Update, or Delete).
Reset Page: Clear Cache.
Process DEPT Record
Next, you create the Process " Process DEPT Record"
with attributes:
Name: Process Row of DEPT
Type: Form - Automatic Row Processing (DML)
Form Region: Department Form (depends on what
you named the form region)
Reset page
Next, you create process "Reset page" 
Identification:
Name: Reset Page
Type: Clear Session State
Settings
Type: Clear all items on the current page 
RESET PAGE
After Processing
After the Process is completed ( Insert, update,
delete) on page 12, to turn back page 9, you need to
create a branch in "After Processing“
After Processing
 Branches (Right Click -> Create Branch)
Identification
 Name: Go To Department Reports
Behavior:
 Page or URL (Redirect)
 Press on Target to define page (Page 9)
Go To Department Report (Branch)

You might also like