Understand of Shared Component in Oracle APEX Application

Step1: Open Application



Step2: Click on Shared Component



Step3: Open Shared Component


Introduction

Oracle APEX (Application Express) is a powerful low-code development platform that enables developers to build secure, scalable, and responsive web applications rapidly. One of the most important areas in Oracle APEX is Shared Components.

Shared Components act as centralized, reusable objects that can be utilized throughout an application. Instead of creating the same object multiple times on different pages, developers can define it once in Shared Components and reuse it wherever needed.

This approach improves maintainability, consistency, scalability, and development efficiency.

What are Shared Components?

Shared Components are application-level objects that can be referenced by multiple pages within an application.

Benefits of Shared Components

·        Centralized management

·        Reduced duplication

·        Easier maintenance

·        Consistent application behaviour

·        Faster development

1. Application Logic

Application Logic components control the overall behavior of an application.

1.1  Application Definition

Purpose

Application Definition contains the core properties and settings of an Oracle APEX application.

What It Stores

·        Application Name

·        Application ID

·        Alias

·        Version

·        Home Page

·        Application Availability

Why It Is Important

Application Definition serves as the identity card of the application and controls how the application behaves globally.

1.2  Application Items



Purpose

Application Items are global variables available throughout the application.

Example

G_USER_ID
G_ROLE
G_DEPARTMENT_ID

Real-World Use Case

Store logged-in user information and access it on any page.

Benefits

·        Accessible from all pages

·        Eliminates duplicate page items

·        Useful for session-level information

1.3 Application Processes

Purpose

Application-level processes execute PL/SQL code globally.

Example

INSERT INTO LOGIN_AUDIT
VALUES (:APP_USER,SYSDATE);

Use Cases

·        Audit logging

·        User tracking

·        Session initialization

1.4 Application Computations



Purpose

Automatically computes values at the application level.

Example

:P0_CURRENT_YEAR := EXTRACT(YEAR FROM SYSDATE);

Use Cases

·        Fiscal Year

·        Current Date

·        User Preferences

1.5 Application Settings

Purpose

Provides configurable settings for applications.

Example

ENABLE_EMAIL
ENABLE_EXPORT
ALLOW_APPROVAL

Benefits

Allows administrators to change application behavior without modifying code.

1.6 Build Options

Purpose

Enable or disable features within an application.

Example

HR Module
Payroll Module
Asset Module

Real-World Scenario

A client wants Payroll functionality disabled temporarily. Build Options can hide the entire module.

2. Navigation and Search

Controls navigation and search functionality.

2.1 Lists



Purpose

Stores collections of links.

Example

Dashboard
Employees
Assets
Reports

Usage

Used in menus, sidebars, and navigation regions.

2.2 Navigation Menu

Uploading: 145003 of 145003 bytes uploaded.

Purpose

Creates the application's main navigation menu.

Example

Home
Employee Management
Asset Management
Reports

Benefit

Provides users with structured navigation.

2.3 Breadcrumbs


Purpose

Shows the user's current location in the application hierarchy.

Example

Home > Employees > Employee Details

Benefit

Improves user experience and navigation.

2.4 Navigation Bar List



Purpose

Displays links in the top-right navigation area.

Example

Profile
Settings
Logout

2.5 Search Configurations



Purpose

Defines global search behavior.

Example

Users can search:

Employees
Assets
Vendors
Departments

3. Data Sources

Used to connect external or JSON-based data.



3.1 REST Data Sources

Purpose

Consume external REST APIs.

Example

Weather API
Google Maps API
ERP API

Benefits

·        Real-time integration

·        External system communication

·        Cloud service connectivity

3.2 JSON Duality Views

Purpose

Provides both relational and JSON access to data.

Benefits

Supports modern API-driven application development.

3.3 JSON Sources

Purpose

Loads and consumes JSON data.

Example

{
  "emp_id":101,
  "emp_name":"John"
}

4. Security

Security controls who can access the application and what actions they can perform.

4.1 Security Attributes


Purpose

Controls application-wide security settings.

Features

·        Session Timeout

·        Cookie Security

·        CSP Policies

4.2 Authentication Schemes



Purpose

Verifies user identity.

Authentication Types

·        Application Express

·        Database Account

·        LDAP

·        SAML

·        Single Sign-On (SSO)

Example

Employee login using company credentials.

4.3 Authorization Schemes

Purpose

Controls access permissions.

Example

Admin
Manager
Employee

Benefit

Ensures users see only authorized pages and components.

4.4 Application Access Control

Purpose

Provides role-based security management.

Roles

Administrator
Contributor
Reader

4.5 Session State Protection

Purpose

Prevents URL tampering and malicious modifications.

Security Benefits

·        Prevents parameter manipulation

·        Protects sensitive data

5. User Interface

Controls application appearance and user experience.

5.1 User Interface Attributes


Purpose

Defines UI behavior and appearance.

Controls

·        Theme selection

·        Language settings

·        UI preferences

5.2 Progressive Web App (PWA)


Purpose

Converts applications into installable web apps.

Features

·        Offline support

·        Mobile installation

·        App-like experience

5.3 Themes


Purpose

Defines overall application styling.

Example

Universal Theme (Theme 42)

Benefits

Provides modern responsive design.

5.4 Templates


Purpose

Controls layout and rendering of components.

Types

·        Page Templates

·        Region Templates

·        Report Templates

·        Button Templates

5.5 Email Templates


Purpose

Reusable email designs.

Examples

·        Welcome Email

·        Approval Email

·        License Expiry Reminder

Benefit

Maintains consistent branding.

5.6 Map Backgrounds

Purpose

Provides maps for map regions.

Examples

·        OpenStreetMap

·        Oracle Maps

6. Workflows and Automations

Automates business processes.

6.1 Task Definitions


Purpose

Defines approval tasks.

Examples

·        Leave Approval

·        Asset Request Approval

·        Vendor Approval

6.2 Automations

Purpose

Runs scheduled actions automatically.

Examples

·        License Expiry Notifications

·        Daily Reports

·        Reminder Emails

Benefit

Reduces manual effort.

6.3 Workflows



Purpose

Defines multi-step business processes.

Example


7. Other Components

Additional reusable objects.

7.1 Lists of Values (LOVs)


Purpose

Provides reusable dropdown values.

Example

SELECT DEPT_NAME D,
       DEPT_ID R
FROM DEPARTMENTS

Benefit

Single source of dropdown data.

7.2 Plug-ins


Purpose

Adds custom functionality.

Examples

·        QR Code Generator

·        Signature Pad

·        Rich Text Editor

7.3 Component Settings


Purpose

Defines default behavior of APEX components.

Example

Default Interactive Grid settings.

7.4 Shortcuts

Purpose

Reusable text snippets.

Example

&COMPANY_NAME.

Output:

ABC Technologies Pvt Ltd

7.5 Component Groups



Purpose

Organizes components into categories.

Example

HR Components
Asset Components
Finance Components

7.6 Data Load Definitions


Purpose

Imports data from external files.

Supported Formats

·        CSV

·        XLSX

·        XML

Example

Employee Bulk Upload.

8. Files and Reports

Manages files and reporting resources.

8.1 Static Application Files


Purpose

Stores files specific to an application.

Examples

·        Logo

·        CSS

·        JavaScript

·        Images

8.2 Static Workspace Files

Purpose

Stores files shared across multiple applications.

Example

Corporate Logo.

8.3 Report Layouts

Purpose

Defines report formatting for PDF generation.

Example

Employee Master Report PDF.

8.4 Report Queries


Purpose

Provides data source queries for reports.

Example

SELECT *
FROM EMPLOYEES;

9. Globalization


Supports multilingual and regional applications.

9.1 Globalization Attributes



Purpose

Controls localization settings.

Examples

·        Date Format

·        Number Format

·        Currency Format

·        Time Zone

9.2 Text Messages


Purpose

Stores reusable messages.

Example

RECORD_SAVED
LOGIN_FAILED
ACCESS_DENIED

9.3 Application Translations


Purpose

Provides multilingual support.

Example Languages

·        English

·        Hindi

·        French

·        German

10. Generative AI

Oracle APEX's AI-powered features.

10.1 AI Attributes

Purpose

Configure AI providers and settings.

Examples

·        OCI Generative AI

·        OpenAI Services

10.2 AI Agents

Purpose

Create intelligent assistants inside applications.

Example

Asset Management Chatbot.

10.3 AI Services

Purpose

Connect applications to AI models.

Examples

·        Document Summarization

·        Text Generation

·        Intelligent Search

Conclusion

Shared Components are the backbone of Oracle APEX applications. They provide centralized management of security, navigation, automation, UI elements, integrations, reports, and reusable business logic. By understanding the purpose of each Shared Component, developers can build applications that are more maintainable, scalable, secure, and efficient.

 


Comments

Popular posts from this blog

Implementing Authentication and Authorization in Oracle APEX

Mastering Shared Components in Oracle APEX

Designing a Scalable Database Architecture for Oracle APEX Applications