Download presentation
Presentation is loading. Please wait.
1
Oracle Application Express (APEX)
Project Implementation for COSC 4120 Database Applications Lab 6
2
Advanced Topics Work with table lookups on composite primary key
Report and form User friendly pages Validations Navigate between pages Publish the application and create test users Export and import the application
3
Composite Primary Key Tables
Tables such as LAWYER_SPECIALTY CASE_CONTACT Work with composite primary key tables
4
Creating Report and Form
Create a report and a form for the table Create page Form Form on a table with report Define report page Implementation: Interactive Page name: Lawyer Specialty Region title: Lawyer Specialty Breadcrumb: Breadcrumb Breadcrumb entry name: Lawyer Specialty Breadcrumb parent entry: Home
5
Defining the Report
6
Defining the Report Define report page
Data source: LAWYER_SPECIALTY (table) Tab options: Use an existing tab set and create a new tab within the existing tab set Tab set: TS1 New tab label: Lawyer Specialty Select columns: LAWYER _ID and SPECIALTY_ID Edit link image: default
7
Defining the Report
8
Defining the Form Define form page Page name: Lawyer Specialty Entry
Region title: Lawyer Specialty Entry Primary key type: Managed by Database (ROWID) Select columns: both columns Process options: Insert, Update, Delete Confirm and create
9
Defining the Form
10
Running Report and Form
Report and form pages are working List, edit, create, update, delete
11
Making Pages User Friendly
Instead of showing ids, descriptive fields should be displayed Report page Modify report region source SELECT LS.ROWID, L.LAST_NAME, L.FIRST_NAME, S.DESCRIPTION FROM LAWYER_SPECIALTY LS, LAWYER L, SPECIALTY S WHERE LS.LAWYER_ID = L.LAWYER_ID AND LS.SPECIALTY_ID = S.SPECIALTY_ID ORDER BY LAST_NAME, FIRST_NAME, DESCRIPTION
12
Making Pages User Friendly
To show desired columns in an active report Use Action Select columns May save the report as default report settings
13
Making Pages User Friendly
Form page Change labels to Lawyer and Specialty Change both to select list (LOV) LAWYER_ID and SPECIALTY_ID
14
Making Pages User Friendly
select LAST_NAME || ', ' || FIRST_NAME as display_value, LAWYER_ID as return_value from LAWYER order by 1
15
Adding Validations Maintain entity integrity
Provide user friendly error message on the form page Validation script SELECT * FROM LAWYER_SPECIALTY WHERE LAWYER_ID = &P??_LAWYER_ID. AND SPECIALTY_ID = &P??_SPECIALTY_ID. Use your page number Notice the ending period for substitution variables SELECT * FROM LAWYER_SPECIALTY WHERE LAWYER_ID = &P??_LAWYER_ID. AND SPECIALTY_ID = &P??_SPECIALTY_ID.
16
Adding Validations Edit the form page, page processing create validation Validation level: Page Validation name: Insert validation Error display location: Inline in Notification Validation type: SQL NOT Exists Validation code: {the validation script} Error message: The lawyer is in the selected specialty. When button pressed: Create Create a similar validation for update
17
Adding Validations
18
Adding Validations
19
Page Navigation Navigation controls are shared components
Create navigation control at the application level on the shared components page Tabs Navigation bar entries Breadcrumbs Lists
20
Tabs Tabs are grouped in collections called a tab set
Each tab must be part of a tab set Two different types of tabs Standard tabs For only one level of tabs with each tab associated with a particular page Parent tabs Parent tab set acts as a container for a group of standard tabs Define more contextual list of tabs
21
Managing Tabs To manage tabs Add new parent tab
Shared components Navigation Tabs Manage tabs Add new parent tab The first parent tab replaces the pseudo parent tab
22
Managing Tabs Move a standard tab between parent tabs
Edit the tab and switch Standard Tab Set
23
Managing Tabs Add more standard tabs under parent tab
In order to show tabs, make sure set to the appropriate Page Template and Standard Tab Set for each page Right click title of the page Edit Display attributes
24
Managing Tabs
25
Navigation Bar Entries
Navigation bar entries offer an easy way to move users between pages A navigation entry enables application to display a link for quick access on pages To access navigation bar entries Shared components Navigation Navigation bar entries Create From scratch Navigation to URL Entry label: Help Page: {a help page} and check [Printer friendly] (optional) Create
26
Publish Application Publish the application with URL Manage APEX users
Manage APEX users APEX home Administration Manage users and groups Create a test user Username: address: User is a developer: No Password:
27
Application Export and Import
Application home Export/Import Export
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.